composite key unmatched query

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,
 
B

Bob Barrows

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top