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.
 
I ran the query wizard but i do not see where to specify unmatched records.
Thank you.
 
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
 

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

Similar Threads

Excel Comparing two columns 1
Help combining queries 1
Union Query of Queries 4
Query is too complex 5
Union query 5
query 2
Union Query requesting parameter 12
dsum sytax error 5

Back
Top