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!

Compare 2 queries, list names that aren't in both

Status
Not open for further replies.

sysr

Technical User
Aug 17, 2001
17
0
0
CA
I have Query A and Query B.

In Query A, I have a list of people with Action Plans.

Andy - Action Plan
Bob - Action Plan
Charles - Action Plan
Doug - Action Plan

In Query B, I have a list of all the Interventions.

Andy - Short Intervention
Bob - Short Intervention
Bob - Long Intervention
Doug - Short Intervention
Doug - Long intervention

I want to get a list of people that have Action Plans but no Interventions. ie. Charles.

I am fairly new to Access. I can do simple queries using the Design View in Access. I would appreciate someone pointing me in the right direction. I don't know if I should be doing some kind of comparison query, what query terms I should searching for to learn about, any help would be greatly appreciated. If possible, I'm hoping to keep it simple, in Design View.
 
I don't think you need two queries to get what you need, but in order to determine that we'd need to see the table that the data is coming from.

Using your example above, here is one way to get the desired result:
Code:
SELECT * FROM queryA WHERE Name NOT IN (SELECT NAME From QueryB)

you will have to switch to the SQL view of the query, you won't be able to do this in the design grid.

HTH

Leslie

In an open world there's no need for windows and gates
 
You may simply follow the unmatched query wizard.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you so much. It looks like it works perfectly, I will run some tests.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top