unmatched query not working

S

sandy

I have two customer lists. One attending our conference and our master
customer list.. I am trying to find those who attended the conference, but
are not on our customer list. I have tried unmatched query, I can only get
it to display records from the master list that doesn't match the conference
list. When I use the unmatch query to display conference attendees not on
master list, no records are displayed.
 
P

pietlinden

sandy said:
I have two customer lists. One attending our conference and our master
customer list.. I am trying to find those who attended the conference, but
are not on our customer list. I have tried unmatched query, I can only get
it to display records from the master list that doesn't match the conference
list. When I use the unmatch query to display conference attendees not on
master list, no records are displayed.

Sounds like a bad design.
You can find those who attend/don't attend by inner/outer joining
Customers to ConferenceAttendance.

Those who do attend
SELECT C.Firstname, C.LastName
FROM Customer AS C INNER JOIN ConferenceAttendance ON
Customer.CustomerID=ConferenceAttendance.ACustomerID;

those who don't:
use an outer join
SELECT C.FirstName, C.LastName
FROM Customer AS C INNER JOIN ConferenceAttendance ON
WHERE CustomerAttendance.PK IS NULL;

I'd rethink my design before going a whole lot further. You could be
making your work seriously difficult for no reason. And most queries
should be almost trivially easy.
 

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