Unable to create relationship

Appears when a new constraint has failed on existing data.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Data exists in table '[table name]', database '[database name]', that violates FOREIGN KEY constraint '[constraint name]' being added. ALTER command has been aborted.

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

Explanation

Existing data fails the foreign key constraint.

Action
See Also
Creating and Managing Database Diagrams Query Fundamentals
Database Diagrams Working with Database Objects
Filtering Rows with WHERE and HAVING  

 

  


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