May 19, 2005 at 1:20 pm
I am trying to run a simple update statement and I do not understand why I am getting this error message.
My query is
UPDATE dbo.TABLE1
SET activity_status = 'I'
WHERE (lake_name = 'Cool Lake')
I get the following
Server: Msg 512, Level 16, State 1, Procedure deficit_year_calc, Line 11
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
Yes there are several records related to Cool Lake but I simply want to update the activity status of the Cool Lake records to 'I'
Is this not simple enough to do?
Thanks for any help as to what I am doing wrong here.
May 19, 2005 at 1:28 pm
There is NO subquery in the Update statement you posted.
Did you notice that the error mentioned a UserDefinedFunction
"deficit_year_calc?". The subquery is probably in the UDF, which
may be in a Trigger.
May 20, 2005 at 3:55 am
This usually means that you have an update trigger on the table which is not designed to handle multirow updates.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply