URGENT: Query to view data from table A minus table B.
Posted on 2006-06-15
Hi, I would like to make a query that will give me rows from table A excluding the rows in table B. Both tables have the same structure.
I know I can use something like below, but I need to do a join on each field (I have 20 fields). The problem I am having is that some of these fields may be null on various rows, so a comparison of A.field1 = B.field1 does not work.
FROM Table2 LEFT JOIN Table1 ON (Table2.d = Table1.d) AND (Table2.c =
Table1.c) AND (Table2.b = Table1.b) AND (Table2.a = Table1.a) AND
WHERE (((Table1.Field1) Is Null));
I am using MS Access 2000, and can use VBA to help do this if necessary - but I would like to avoid using Access specific commands/features since I would like to migrate to another system in the near future. Can someone provide me a fairly simple solution.