Table Comparison Question

  • Thread starter Thread starter nlayman
  • Start date Start date
N

nlayman

I have two tables. Both tables contain a unique set of numbers that identify
a product. How do I compare the two tables to see which items from one table
are not included in the other table. Feel free to email me @
(e-mail address removed). Thank you.
 
Generally, it is considered impolite to ask someone to reply directly to you,
rather than to the newsgroup.

When you click on the New Query button on the Access menu bar, the dialog
that pops up should provide you with an option of using the "Find Unmatched
Query Wizard". Select that option and follow the wizard. Once you are done,
take a look at the SQL generated by the wizard.

HTH
Dale
 
Try this method. First build a union query to result in a complate list.
SELECT [Change Requests].[Date open]
FROM [Change Requests]
UNION SELECT [Change Requet-1].[Date open]
FROM [Change Requet-1];
Then a second query to find records not in both.
SELECT Date_Open_list.[Date open], [Change Requests].[Date open], [Change
Requet-1].[Date open]
FROM (Date_Open_list LEFT JOIN [Change Requests] ON Date_Open_list.[Date
open] = [Change Requests].[Date open]) LEFT JOIN [Change Requet-1] ON
Date_Open_list.[Date open] = [Change Requet-1].[Date open]
WHERE ((([Change Requests].[Date open]) Is Null)) OR ((([Change
Requet-1].[Date open]) Is Null));
 
You actually need to do the "Find Unmatched Query" twice - once from the
perspective of each table.
qry 1 finds A not in B
qry 2 finds B not in A
 

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

Back
Top