Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update returning error

Status
Not open for further replies.

mwa

Programmer
Jul 12, 2002
507
US
I am running the following update satement:
Code:
update dbo.SECTION125
set status  = 'C'
where emp_id in (select emp_id from Enrollment_Confirmation)
And I get the following error:

"Subquery returned more than 1 value. This is not permitted when the subquery follows =,!=,<,etc."

I've never had a problem doing similar updates in the past. I've only seen this error when the "set" relies on a subquery that returns multiple records. In this case, the "set" is hard coded to 'C'. Anyone have ideas why this is not working?

mwa
<><
 
My best guess is that you have a 'mis-behaving' trigger. To see what triggers exist on the table...

Code:
sp_helptrigger 'Section125'

My guess is that there is at least one trigger where 'IsUpdate' = 1. Furthermore, my guess is that the trigger was written to ONLY accommodate 1 row being updated at a time.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
That was the problem. Thanks!

mwa
<><
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top