I have two Database (eg. two .mdb file). both have same name, same table and same field. the difference is one is old and other is updated copy of .mdb file. i want to copy only new records from the updated copy of the .mdb to the older one. is there any way other than iterate trough all the records and compare and filter only newer one?
+1
A:
select *
from A
where (col1,col2,…) not in
(select col1,col2,… from B)
union all
select * from B
where (col1,col2,…) not in
(select col1,col2,… from A);
Edit: sorry, you only need to do this one way.
select * from B
where (col1,col2,…) not in
(select col1,col2,… from A);
Orbit
2010-10-23 10:54:27