How do a create a query to find non-duplicate values?

S

SeekerFan

I'm trying to transfer missing employee numbers from one table to another and
I just want to make sure I'm grabbing the numbers that aren't already in the
second table.
Thank you,
 
K

Ken Snell [MVP]

SELECT Table1.EmployeeNumber
FROM Table1 LEFT JOIN Table2
ON Table1.EmployeeNumber = Table2.EmployeeNumber
WHERE Table2.EmployeeNumber Is Null;

The above query will show all EmployeeNumber values that are in Table1 but
not in Table2.
 
S

SeekerFan

"ON Table1.EmployeeNumber = Table2.EmployeeNumber
WHERE Table2.EmployeeNumber Is Null;"

I got to the point where I left join table 1 to table 2, but I got lost at
this point and I'm not sure what to do now.
Thank you
 
K

Ken Snell [MVP]

Assuming that you're working in the design grid view of the query, drag the
EmployeeNumber field from Table2 to the grid, uncheck the Show box, and put
Is Null in the Criteria: cell.
 

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