SQL Server 2000 incorrect message: duplicate key with unique index
- by iar
Database server: SQL Server 2000 - 8.00.760 - SP3 - Standard Edition
I have a table with 5 columns, in which I want to add a large (300.000) number of records. There is a unique index on the combination of two columns. If I add the records with this unique index in place, SQL Server gives this error message:
Msg 2601, Level 14, State 3, Line 1
Cannot insert duplicate key row in object 'TESTTABLE' with unique index 'test'.
The statement has been terminated.
(0 row(s) affected)
However, if I delete the unique index and then add the records, I do not get any error when I create this unique index afterwards.