January 14, 2010 at 4:04 pm
I have just dropped the index for a table in my DB,and when i create newly it says as :
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.tblone' and the index name 'PK_one'. The duplicate key value is (5635879).
How to resolve this
January 14, 2010 at 6:23 pm
Was the original index unique ?
Can you show us the script for the index before you dropped it, and the script for the new index ?
January 14, 2010 at 6:27 pm
Hi there,
Between the drop of the index and the creation of the index was there any activitie on the table?
You can identify the duplicated records by performing the folloing query
SELECT <List of columns included in the Unique INDEX>, count(*)
FROM dbo.tblone
GROUP BY <List of columns included in the Unique INDEX>
HAVING COUNT(*) > 1
José Cruz
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply