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 2000 Forums
 SQL Server Administration (2000)
 Update Statement isn't working???

Author  Topic 

rardales
Starting Member

32 Posts

Posted - 2005-04-01 : 12:11:25
This is the message I get:

Server: Msg 547, Level 16, State 1, Line 1
UPDATE statement conflicted with COLUMN FOREIGN KEY constraint 'FK1012_benefit_type_code'. The conflict occurred in database 'portal', table 'benefit_type', column 'benefit_type_code'.
The statement has been terminated.


after typing this update statement:

update work_comp_claimant
set benefit_type_code ='5'
where claim_id = '3749'


I need to change the benefit_type_code to a 5 for claim_id=3749.
I would appreciate your help. Thanks.

rfrancisco
Yak Posting Veteran

95 Posts

Posted - 2005-04-01 : 12:16:50
Make sure that in the benefit_type table, there is a record where the benefit_type_code = '5'. If not, then you should add it there or use another benefit_type_code that exists in the benefit_type table.
Go to Top of Page

rardales
Starting Member

32 Posts

Posted - 2005-04-01 : 12:22:48
Oh, yes you're right. I knew there was a 5, but after viewing the benefit_type table, I notice that it was actually a 05

Thanks for your help. I appreciate it.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-04-01 : 12:47:18
Score another one for constraints!



Brett

8-)
Go to Top of Page
   

- Advertisement -