Not-in Query

  • Thread starter Thread starter SDMFG
  • Start date Start date
S

SDMFG

Is there a way to run a query that returns data that is in one table to not
another? For example, I have a table that gets imported that has client
names. I have another table with details of the client names, but I update
this one manually. Can I run a query that tells me new clients added to the
imported table that I must manually update in the detailed table?

Thanks
 
Have you tried the query wizard about finding unmatched records?


Vanderghast, Access MVP
 
Karl, thanks for the reponse. Access says that this feature is not
installed, and I work in an office with an old version (2000), so I don't
have the disk. Is there a way to download this feature with my software ID?
 
You can try something like (in SQL view):


SELECT tableA.*
FROM tableA LEFT JOIN tableB
ON tableA.fieldToMatch = tableB.fieldToMatch
WHERE tableB.fieldToMatch IS NULL



to find records in tableA not matching any record in tableB.


Replace tableA, tableB and fieldToMatch as it fits your case.




Vanderghast, Access MVP
 
Thanks, Michael - I'll give it a try.

Michel Walsh said:
You can try something like (in SQL view):


SELECT tableA.*
FROM tableA LEFT JOIN tableB
ON tableA.fieldToMatch = tableB.fieldToMatch
WHERE tableB.fieldToMatch IS NULL



to find records in tableA not matching any record in tableB.


Replace tableA, tableB and fieldToMatch as it fits your case.




Vanderghast, Access MVP
 
Back
Top