How to compare two queries to get desired result

  • Thread starter Thread starter PatrickM
  • Start date Start date
P

PatrickM

The setup I'm dealing with is as follows:

- The rows in both queries contain a field called 'system number' which is
the field being compared.
- In the first query there is only one row for each system number.
- In the second query there are many rows for each system number.
- The system numbers in the first query may or may not all be in the second
query.
- The system numbers in the second query are defnitely not all in the first
query.

How do I extract all the records from the second query which have system
numbers that are in the first query? I'm looking for advice on the general
technique. As far as I know it involves (among other things) a one-to-many
match, but beyond that I don't know how to go about it.

Thanks,
Patrick
 
You can create an inner join query to give you rows that are common to both
queries. If you use the query designer, link the two queries on the common
field (system number, I assum) and choose the first option for Join
Properites: "Only include rows where the joined field from both tables are
equal."
 
Back
Top