Asked By
s.susan74
0 points
N/A
Posted on - 12/27/2011
Hi All,
I just lost two thousand records from the Assets table. I also lost more than two thousand records from the associated tables of ‘Time Assets’ and ‘Asset Billing Rate’. All these tables are using ‘id field’ as primary key. I could bale to locate the records which had lost. But when I tried to insert those entries from the backup with the ‘Set Identity_Insert’, it failed miserably with an error message which says that ‘duplicate key cannot be inserted in database’. Please help me to solve the issue. Please help me to get out this problem.
Thanks in advance.
Duplicate key cannot be inserted in database
If you are receiving an error that is telling you that a duplicate key cannot be inserted in the database, then that implies that the records you are trying to re-add to the database are lost as you think, but they are just hidden, and therefore you can retrieve them. Depending on the database application that you are using, you will need to figure out the command for unhiding hidden records in the database and use it to retrieve those records. You can go to Google or your favorite search engine and then search for the commands there; you will for sure find them.
-Thompson Locker