Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2007-03-01 : 15:29:11
|
2 Tables: tblEquipments with field testTechnology(int)tblTestTechnology with field id(int and primary key)And tblTestTechnology has another field with text that goes w/id numberSo, adding a constraint to tblEquipments.... ALTER TABLE [dbo].[tblEquipments] ADD CONSTRAINT FK_testTechnology_tblEquipments FOREIGN KEY (testTechnology) REFERENCES tblTestTechnology (id) I get the error:ALTER TABLE statement conflicted with COLUMN FOREIGN KEY constraint 'FK_testTechnology_tblEquipments'. The conflict occurred in database 'myDatabase', table 'tblTestTechnology', column 'id'.I have double checked and all the numbers in the tblEquipments field testTechnology exist - no blanks, and they exist in in the constraining table.Why the error and what can I check?Thanks,Zath |
|
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2007-03-01 : 15:33:58
|
Nevermind, found the problem Zath |
 |
|
|
|
|