Update Help

The following statement is not working:  

update dbo.main
    set LastName = 'JOHNSTON'
     where  LastName = 'COFFMAN'


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.




wyclefAsked:
Who is Participating?
 
lengreenCommented:
wyclef,

Good Question, Updating of surnames would be quite common (IMO) , without knowing what the trigger does , I would suggest editing your trigger to ensure you only return one row in your subquery

cheers
0
 
lengreenCommented:
Hi wyclef,

The statement on its own is fine, do you have an update trigger on dbo.main?

Cheers!
0
 
rafranciscoCommented:
Are you sure this is the whole statement you are trying to execute?  If not, please post the original UPDATE statement.
0
 
wyclefAuthor Commented:
lengreen,

You are right I have a trigger.  How to get around this without disabling the trigger?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.