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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 create FK

Author  Topic 

constantinos1987
Starting Member

25 Posts

Posted - 2008-12-01 : 15:02:18
trying to create an FK the following error occured. dows anyone knows what is the problem???

'item_groups' table saved successfully
'items' table
- Unable to create relationship 'FK_items_item_groups'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_items_item_groups".
The conflict occurred in database "ergasia", table "dbo.item_groups", column 'group_ID'.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-12-01 : 15:07:06
I think there are already records in table items with no pendant in item_groups.
So first insert the wanted records in item_groups and then create the FK.

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -