15 years ago
werni_us

MS Access 2 tables delete query?

I have 2 tables one called NATURENEW the other NATUREOLD . NATUREOLD contains records that are also in NATURENEW How can I delete the records that are in BOTH Tables from NATURENEW Thanks a lot Werner
Top 3 Answers
15 years ago
Abrar A
Favorite Answer
If you have a primary key in both the tables, you can delete the records in NATURENEW based on the primary key using following SQL query. I assume your primary key for both tables is say, id DELETE NatureNew.* FROM NatureNew INNER JOIN NatureOld ON NatureNew.id=NatureOld.id; if you have more than one field to compare, use AND operator to compare fields in both tables before deleting.
0
6 years ago
angelou
you do no longer certainly want code nor build a application to accomplish this. you should use the advice Transformation centers (DTS) that comprise sq. Server 2000 to append your archives. yet another much less complicated option is importing the advice using the Import / Export wizard in company supervisor. wish this helps.
0
15 years ago
TheMadProfessor
DELETE FROM naturenew WHERE fieldkey IN (SELECT DISTINCT n.fieldkey FROM naturenew.n natutureold o WHERE n.fieldkey = o.fieldkey)
0