Difference Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to run a query on two tables to find the last name and first name
pairs that do not apear in both tables. I can obviously get the union but how
do i get the difference. Thank you for all your help.
 
When you create a query, run the wizard and select the Query that return the
unmatch records.
 
This query example return the LastName in table1 that are not in table2, I'm
using a right join between the two fields, and ask for all the name that are
null in table 2 which they are not there
Hope that help

SELECT MyTable1.Last_Name
FROM MyTable2 RIGHT JOIN MyTable1 ON MyTable2.Last_Name = MyTable1.Last_Name
WHERE MyTable2.Last_Name Is Null
 
Back
Top