Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very simple query statement

Status
Not open for further replies.

sysr

Technical User
Aug 17, 2001
17
0
0
CA
I don't use Access much and need a little help with a query.

I have a Clients query with a list of IDs (identifying the client) and a Report query with a list of IDs (same ID# as client ID, and there may be some IDs that are listed several times).

I want to see which Clients IDs are not in the Report IDs.

Here is my failure:
SELECT Clients.ID WHERE Clients.ID NOT IN Report.ID;

Thanks for any help.
 
select Clients.ID
from Clients
left join Report
on Clients.ID =Report .ID
where Report .ID is null
 
And to follow your oiginal idea:
Code:
SELECT Clients.ID
FROM Clients
WHERE Clients.ID NOT IN (SELECT Report.ID FROM Report)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks you so much, it works great!!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top