Criteria question

J

JT

I have a query with 2 tables joined. Table A is much
larger than Table B.

Each transaction in Table B contains a group number. Each
record has only one group number. However a group number
can appear in a number of different transactions. The
group numbers in Table B are less than the total
population in Table A.

I only want to select records in Table A if the group
number appears i Table B.

I can write the criteria with an IN command but I'm
looking for suggestions on writing the criteria so it
looks to the group numbers in Table B and does not require
any manual intervention.

Thanks for the help.
 
G

Gerald Stanley

Try something along the lines of

WHERE tableA.groupNumber IN (SELECT DISTINCT groupNumber
FROM tableB)

Hope This Helps
Gerald Stanley MCSD
 
V

VJ-mike

sorry, just curious - JT?

Terrill?

if so, an old aquaintance from the sewers is watching you,
lol!
 
Top