|
Archives of the TeradataForumMessage Posted: Tue, 09 Dec 2008 @ 19:28:28 GMT
The duplicate primary key error can be caused because of the following: 1. The file or the table from where you are loading records into the target table have more than 1 record with the same UPI (unique primary index.). The duplicate primary key error is caused if you are trying to insert data into a table with a UPI which is already in the table. To find the erroneous record: Sel * from source_tbl where UPI in (sel UPI from target_tbl) You may have to delete this record from the source table or use an update statement to update the record in the target table, with the source record. You cannot have both the record as you table has a unique primary index. If you are using loading from a file, use mload with insert and update statement and use the option: 'Do insert for missing update row' Regards, Shubhangi
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||