Hi.
I have a fairly simple append query where I want to append the records from one table into another, only if they don’t already exist in that table. The table that I am appending to is the Staff table and the primary key is Staff ID.
This is the sql I have
INSERT INTO Staff ( StaffID )
SELECT zOperaII.wn_ninum
FROM zOperaII LEFT JOIN Staff ON zOperaII.wn_ninum = Staff.StaffID
WHERE (((Staff.StaffID) Is Null));
By the nature of the query, I’m only appending records where the key field does not already exist in the destination table. However, I am receiving the error message “can’t append all records….. didn’t add 140 records .. due to key violations.
There are no other unique fields in the destination table (I checked by looking at the indexes).
Does any one have any suggestions?
Many thanks
Amanda