composite key unmatched query

  • Thread starter Thread starter inungh
  • Start date Start date
I

inungh

I would like to have a composite key unmatched query.
MS Access has user interface to create unmatched query, but only
support for one primary key. I just wonder are there any way to get
unmatched query for composite key.


Your information is great appreciated,
 
inungh said:
I would like to have a composite key unmatched query.
MS Access has user interface to create unmatched query, but only
support for one primary key. I just wonder are there any way to get
unmatched query for composite key.
Don't use the wizard. Create a new query in Design mode, select the
tables, create the joins, modify the joins so that an outer join is
created, pull one of the fields from the right side of the join into the
grid and enter "Is Null" into the criteria row. Pull the fields you need
to see from the table on the other side of the join into the grid and
run it.

Or skip all that: switch immediately to SQL View and write the query you
need:

SELECT t1.*
FROM TableWithAllData As t1
LEFT JOIN TableWithMissingDataAs t2
ON t1.keyfield1 = t2.keyfield1 AND ... AND t1.keyfieldN=t2.keyfieldN
WHERE t2.keyfield1 IS NULL
 
Back
Top