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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Foreign key

Author  Topic 

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-01-13 : 10:26:43
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Agent_Chief". The conflict occurred in database "CallSheet"<c/> table "dbo.Chief". [SQLSTATE 23000] (Error 547) The statement has been terminated. [SQLSTATE 01000] (Error 3621).


but I got only 3 keys... but when I click one It shows 4 !

Pls help !

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-13 : 10:30:01
see the definition of FK_Agent_Chief and understand which column its refering to. make sure the value trying to insert is a valid value existing in master table.
Didnt understand how you see 4 when you've only 3 keys defined. see definition of table and make sure you've only 3 keys defined
Go to Top of Page

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-01-14 : 08:03:28
I deleted one key witch didn't show in object explorer but it did show when I double click on a secondary key then I see 4 keys...
Go to Top of Page
   

- Advertisement -