Not-in Query

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
 
M

Michel Walsh

Have you tried the query wizard about finding unmatched records?


Vanderghast, Access MVP
 
S

SDMFG

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?
 
M

Michel Walsh

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
 
S

SDMFG

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
 

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