• Register
1 vote

Problem :

I am facing bellow error
the create unique index statement terminated because a duplicate key was found for the object name
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

The problem is not that index already exists but there are duplicate values of the TopicShortName field in the table itself. Such duplicates prevent the creation of a UNIQUE index.

So you should run a query to confirm that you have a duplicate:

    COUNT(*) > 1

Presumably in the other database the data are different, and the duplicates are not present.

This will certainly solve your problem.

Further Readings :


9 7 4
38,600 points

Related questions

0 votes
1 answer 7 views
1 vote
2 answers 56 views
Problem : I am very new to database programming. I have recently started learning about databases. Currently I am desperately trying to create the database somehow for a very first time. I have already designed all of my tables. Now I am trying to create their relationships. But ... till now unable to fix it. So I am looking for database expert who can suggest me the quick fix for my above error.
asked Apr 22, 2020 stewart 4k points
0 votes
1 answer 17 views
0 votes
2 answers 488 views
Problem : I want to import the flat file into my oledb target sql server database. But I am getting below error message : [Source - 18942979103_txt [424]] Error: Data conversion failed. The data conversion for column "recipient-name" returned status value 4 and status text ... more characters had no match in the target code page.". Why am I getting this error message? What am I doing wrong here?
asked Dec 23, 2019 alecxe 7.5k points
1 vote
1 answer 127 views
Problem : I am very new to SQL. If I try to use the sp_executesq I am often facing below strange looking error: “Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.” I have spent more than two days on above error but still can not fix above sql related error. Please guide me in fixing above sql error.
asked May 12, 2020 Martin K 6.6k points
0 votes
1 answer 46 views
Problem : I was getting the following error when running a SQL the conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 43 views
0 votes
1 answer 537 views
Problem : I am using the spring security along with java config. I am using the PostMan for testing my REST services. I get a 'csrf token' successfully and I am able to login by using a X-CSRF-TOKEN in request header. But after login when I hit a post request( ... 403 - Could not verify the provided CSRF token because your session was not found.” Can some one guide me what I am doing wrong?
asked Jan 25, 2020 jwilliam 3.9k points
0 votes
1 answer 196 views
Problem : My stored procedure giving me following error cannot perform an aggregate function on an expression containing an aggregate or a subquery.
asked Nov 15, 2019 peterlaw 6.9k points