Hello,
I have have searched through numerous post in this forum, but I still have the following question:
I have a database with a table say tblPeople. This table contains e.g. the following fields:
ID----NAME----SURNAME----HAND---PERCENT1---PERCENT2
1-----John-------Jones-----(empty)--(empty)---(empty)
1-----Mary-------Masters---(empty)--(empty)---(empty)
ID is the primary key.
Therefore, the data in this table already exists for fields, ID, NAME and SURNAME, but not for HAND, PERCENT1 and PERCENT2.
I then imported data from a spreadsheet into another table, say tblTemp (without primary key) which now contains the data for each person’s HAND, PERCENT1 and PERCENT2, and in this table there is exactly the same amount of records as in tblPeople. I want to add the data from tblTemp top tblPeople now and have used an append query. I get the error message though “not appended due to key violations” for all the records to be added.
Here is the SQL for the append query:
How can I get past this? Thanks for tips in advance!
Regards,
Jean
I have have searched through numerous post in this forum, but I still have the following question:
I have a database with a table say tblPeople. This table contains e.g. the following fields:
ID----NAME----SURNAME----HAND---PERCENT1---PERCENT2
1-----John-------Jones-----(empty)--(empty)---(empty)
1-----Mary-------Masters---(empty)--(empty)---(empty)
ID is the primary key.
Therefore, the data in this table already exists for fields, ID, NAME and SURNAME, but not for HAND, PERCENT1 and PERCENT2.
I then imported data from a spreadsheet into another table, say tblTemp (without primary key) which now contains the data for each person’s HAND, PERCENT1 and PERCENT2, and in this table there is exactly the same amount of records as in tblPeople. I want to add the data from tblTemp top tblPeople now and have used an append query. I get the error message though “not appended due to key violations” for all the records to be added.
Here is the SQL for the append query:
Code:
INSERT INTO tblPeople ( Hand, Percent1, Percent2 )
SELECT tblTemp.Feld1, tblTemp.Feld2, tblTemp.Feld3
FROM tblTemp;
How can I get past this? Thanks for tips in advance!
Regards,
Jean