Simple LEFT JOIN Query, MS Access 2003

  • Thread starter Thread starter patboner
  • Start date Start date
P

patboner

Hi,

I have two Tables; table2005 and table2006, and want to find all entries in
table2006 which do not occur in table2005. The SQL statement

SELECT DISTINCT *
FROM table2006 LEFT JOIN table2005
ON table2006.names = table2005.names

works well, but returns all enteries present in both tables and the new
entries in table2006. The SQL statement

SELECT DISTINCT *
FROM table2006 LEFT JOIN table2005
ON table2006.names <> table2005.names

only makes the CPU work pretty hard, but does not return anything - at least
not within an acceptable time span.... I assume there is an explanation for
this, however, I have not been able to find it. I would be very grateful if
someone could tell me why I can not (or should not) use the "<>"-operator in
the SQL-statement above, and of course if anyone knows a better way.

Have a nice day!
patboner
 
Hello "patboner".

patboner said:
Hi,

I have two Tables; table2005 and table2006, and want to find all
entries in table2006 which do not occur in table2005. The SQL statement

SELECT DISTINCT *
FROM table2006 LEFT JOIN table2005
ON table2006.names = table2005.names

works well, but returns all enteries present in both tables
and the new entries in table2006. [...]

SELECT DISTINCT *
FROM table2006 LEFT JOIN table2005
ON table2006.names = table2005.names
WHERE table2005.names IS NULL
 
Back
Top