Unable to create index

Appears when a new index has failed on existing data.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Create unique index aborted on duplicate key. Primary key is '[primary key data]'

[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.

Explanation

A unique index was created in the Indexes/Keys property page but duplicate data exists in the database. The value after the phrase "Primary key is" is the first duplicate value that Microsoft® SQL Server™ found as it created the index.

Action
See Also
ALTER TABLE Index Object
CREATE INDEX Indexes
CREATE TABLE Query Fundamentals
Creating SQL Server Indexes Table Indexes
How to create an index on an existing table (Enterprise Manager) UNIQUE Constraints
How to create an index using the Create Index Wizard (Enterprise Manager) Using the Select List
How to create an index when creating a table (Enterprise Manager)  

 

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.