Access help please...

flyingdog

Member
Have two tables. Table A and Table B. Table B is a subset of A. I want all records in A that are not in B. This is not rocket science, but heck if I can figure it out.

Thanks in advance...
 
OK - I am not a DB expert, but understand enough to get myself in trouble, so here it goes - I still do not understand what you are trying to do so here it goes;

I talked to my SQL guy and he believes Access is not flexible enough to do this, but this is how it is done in SQL...

You need to join both tables. Then create a query statement and in the "where" statement when you have a NULL return value this will be the items in the tables which are not the same (based on the where querey)... from there, the NULLS can be displayed or placed in a third table.
 

aanderson

Member
Check the join property in the query...right-click on the actual arrow that is joining the tables. There are different options you can choose and usually one will be what you are looking for.
 

schmide

New Member
I always have to look up this crap but if you can execute a SQL statement it would be something like so


HTML:
SELECT * FROM A
EXCEPT
SELECT * FROM B

The three (four) set operators that provide the functionality your looking for are UNION (ALL), INTERSECT, and EXCEPT. The UNION ALL does not remove duplicates.
 
Top