Unmatched Query on Multiple Columns?

riggsd

Registered User.
Local time
Today, 07:02
Joined
Dec 2, 2003
Messages
28
I need to compare two tables and find the records that don't match. The first table is from a query run on the Access database and saved to a table. The second table is from a report extracted from an Oracle database then imported into a table in the Access database.

I tried the unmatched query wizard, but it only allows you to check on one column. For my purposes, I need all three columns in each table to match exactly.

Can the unmatched query be modified to do this and if so, how would this be done?
 
For unmatched query scenario involving multiple columns, the following structure is recommended. For this example, we will look in Table1 for records which do not have related records in Table2, using Field1, Field2 and Field3 for our matching columns:
Code:
SELECT Table1.*
FROM Table1 LEFT JOIN Table2
ON Table1.Field1=Table2.Field1
AND Table1.Field2=Table2.Field2
AND Table1.Field3=Table2.Field3
WHERE Table2.Field1 Is Null;
See if this works for you.
 
Yes, thank you very much.
 
There are several places where the Access wizards are limited. Once the wizard has built the basic query (or whatever), you can then modify it.
 
Yes, I realize that. I just didn't know how to modify it for this instance. I appreciate the assistance.
 

Users who are viewing this thread

Back
Top Bottom