So, to confirm... when you do the update you want to add new records and update existing records (by deleting the old version and add the new version).
Fairly simple, but you need to approach it in a piecemeal fashion, ie:
1. Remove the existing duplicated records first (this is a delete query)
2. Now all you need to do is add all the new records (append query)
1. You can identify and delete the existing duplicated records by linking on Field2 and deleting all that match, so something like:
"Delete from tblExisting where tblExisting.Field2 = tblNew.Field2"
2. Assuming you have a unique index on Field2, you can now simply add ALL records from your new table to the existing table, since you have already removed any duplicates, so something like:
"Insert into tblExisting (Field1, ... FieldN) Select Field1, ... FieldN from tblNew"
I do hope I have the right end of the stick!
|