How to compare two tables? (1 Viewer)

polina

Registered User.
Local time
Today, 12:49
Joined
Aug 21, 2002
Messages
100
Hi

I have two 70000 records tables and I need to compare them in order to find the differences and insert them into the thrid temporary table.

E.g.


Table 1
RecID Name
1 John
2 Maria
3 Mark
4 Tim


Table2
RecID Name
1 John
2 Maria
3 Mark


So, after the comparison of these two tables, the third table should have the record : 4 Tim


What I've tried so far is using this SQL:

DoCmd.RunSQL ("SELECT * INTO tblEmpNonActive FROM Table1 WHERE RecID NOT IN (SELECT RecID FROM Table2)")

But that executes forever...even though the RecID is indexed.


Please help me with this.

Thanks.
 

ColinEssex

Old registered user
Local time
Today, 12:49
Joined
Feb 22, 2002
Messages
9,116
Can you use the "Find unmatched query wizard"?

Col
 

Users who are viewing this thread

Top Bottom