[Repost] Getting Non-Matching Keys Possible?

  • Thread starter Thread starter aleatory
  • Start date Start date
A

aleatory

Hi all,

I'm reposting this to other Access-related newsgroups.
So far nobody has replied to my question.

Many thanks in advance,

alea
 
Would the following work for you? It is a query that is slightly modified
from the "Find Unmatched Query Wizard".

SELECT Table1.[key1], Table1.[key2]
FROM Table1 LEFT JOIN Table2 ON (Table1.[key1] = Table2.[key1]) AND
(Table1.[key2] = Table2.[key2])
WHERE (((Table2.[key1]) Is Null) AND ((Table2.[key2]) Is Null));

The above should return all records in Table1 which do not have matching
keys in Table2.
 
Hi Cheryl,

Thanks for the great tip! It worked great
and produced correct outputs.

By the way, I just wonder why MS Access
SQL is so different from other implementations
such as Oracle and Informix. It would have been
virtually impossible for me to come up with the
code from Cheryl!

Thanks again Cheryl.

alea



Cheryl Fischer said:
Would the following work for you? It is a query that is slightly modified
from the "Find Unmatched Query Wizard".

SELECT Table1.[key1], Table1.[key2]
FROM Table1 LEFT JOIN Table2 ON (Table1.[key1] = Table2.[key1]) AND
(Table1.[key2] = Table2.[key2])
WHERE (((Table2.[key1]) Is Null) AND ((Table2.[key2]) Is Null));

The above should return all records in Table1 which do not have matching
keys in Table2.


--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


aleatory said:
Hi all,

I'm reposting this to other Access-related newsgroups.
So far nobody has replied to my question.

Many thanks in advance,

alea

(e-mail address removed) (aleatory) wrote in message
 
Back
Top