Sql Update Cannot Insert Duplicate Key Row In Object With Unique Index






Cannot insert duplicate key row in object' dbo.test' with unique index 'test0'. cannot insert duplicate key row in object' dbo.test' with unique index 'test0'. cannot insert duplicate key. When i tried to insert this into the table tbl_dfq_parts i get this error: [microsoft][odbc sql server driver][sql server]cannot insert duplicate key row in object 'dbo.tbl_dfq_parts' with unique. Technically they occur for any unique key, of which the primary key is one of possibly many, and they all boil down to trying to end up with two rows in the table that “match” based on the unique key..












Hi chris, just to give an idea, did you check the original column of the fk column , if it is making any inserts there. also check the properties of the index for option ignore duplicate values ;p. Yes, it is a key column of composite primary key. and also it is unique non clustered index. unfortunately, i didn't get his duplicate when i checked that's why i kept it in forum for your help.. Hi pratboy, between the execution of the exists-select check and the insert statement, another execution of the proc with the same new value may insert the row causing a duplicate even though the exists-select did not find it..



sql update cannot insert duplicate key row in object with unique index

visit link reference



Comments