
November 26th, 2003, 02:25 PM
|
|
Registered User
|
|
Join Date: Aug 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Update Error
I'm trying to updates a table in my database based using the values from another table. I get the following error when I run this update statement:
update refmd
set refmd.code = refmd_other_data.val
from refmd (nolock) join refmd_other_data (nolock) on refmd.id = refmd_other_data.refmd_id
where refmd.active = 'Y' and refmd_other_data.field_id = '114'
Server: Msg 512, Level 16, State 1, Procedure trgu_refmd, Line 15
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.
Does this mean I need to use a cursor to step through my updates?
Thanks for any help!
|