Help With Minus Statement (difference Between Tables)


Feb 1, 2012
Hi everyone,
I got a problem translating a query from Oracle to Access 2010 because I don't know how to write the 'MINUS'.
I have to do the difference between two tables and I've tried using a 'LEFT JOIN' but I don't get the same result.

Basically, given two input values, the query has to show me a table with all the differences between these two tables.
Now I have this query:

SELECT value1, value2, value3, ...
FROM Table1 LEFT JOIN Table2
ON Table1.CODE = Table2.CODE
WHERE Table1.oldcode=[Please provide the oldcode:] AND Table2.newcode=[Please provide the newcode:]

As a result I get a table with more than 1.000 records but I'm expecting a table with 4 records.
Using the 'MINUS' statement on Oracle it works properly.

How can I do it?

Thank you


Jul 8, 2011
Access isn't really designed to be SQL'ed...

You should be able to at least do some sort of sub-query with a comparison against it. Not in, or <> or something.

SELECT * FROM sometable LEFT JOIN USING (joinclause)
WHERE sometable.selector = selection AND
someothertable.negative <> (SELECT negative FROM someothertable WHERE someothertable.negativeselector = 'Boo');

Not sure of the exact syntax that it would be in ACCESS though.