no MINUS in Access Queries?

intern42

Registered User.
Local time
Today, 15:25
Joined
May 28, 2003
Messages
24
I have two tables with identical fields.

The newer table has 200+ additional records and I need to find out exactly which records are new.

I know in PL/SQL you can do a minus query that looks like:

SELECT *
FROM NewTable

MINUS

SELECT *
FROM OldTable;

This doesn't seem to work in Access (I guess the MINUS isn't a valid Access SQL option?)

I tried to get around this by using the statement:

SELECT *
FROM [New TERMINAL20]
WHERE
[New TERMINAL20].lname <> ( SELECT lname FROM [terminal20])
AND
[New TERMINAL20].fname <> (SELECT fname FROM [terminal20])
AND
[New TERMINAL20].badge <> (SELECT badge FROM [terminal20])
AND
[New TERMINAL20].accessGroup <> (SELECT accessGroup FROM [terminal20];

This didn't work because of the "<>" symbol.
The "!=" symbol didn't work either.

Any suggestions? All I need to do is identify the 200+ records in the new table that were NOT in the old table.

Thanks in advance.
 
Thanks for the quick reply, but I don't see an option for "unmatched" anywhere in the wizard or design view.

Could you be more specific, please?
 
Click on the queries tab in the db window, click new, click find unmatched etc
 
Wow, that was amazingly simple.

I've never clicked on "New" before, I've always just clicked on "create new query in design view."

Anyway, that worked beautifully.

Thanks for saving me a ton of time and effort.
 

Users who are viewing this thread

Back
Top Bottom