I'm trying to do a simple update. I've done this kind of thing thousands of times.
update articles
set department = 60
where type = 'Top Story'
Today I get a strange error.
Describe Error: Failed to retrieve execution plan: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Warnings: ---> W (1): The statement has been terminated. <---
1559 record(s) affected
There is no subquery in the update statement. What's going on?
Most likely there is a trigger on the table, and the error is occurring in the trigger, not in your actual SQL statement.
I would further bet that the trigger assumes the insert or delete special tables will only ever have a single row (which is in fact not the case in mass updates, like the one you're executing), causing the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With