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.
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.