Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mgp
Starting Member
9 Posts |
Posted - 2009-05-05 : 16:29:42
|
| HiI need to update multiple rows in a table.I'm getting the error message:Server: Msg 512, Level 16, State 1The goal is to find all the dates older than what i want and replace them with a later date.Here is the simple query:Update tableNameset ColumnName = '2020-01-01 00:00:00.000'where ColumnName < '2017-01-01 00:00:00.000'Can anyone help with my sql statement? |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-05-05 : 16:31:56
|
| whats the full error message ? |
 |
|
|
mgp
Starting Member
9 Posts |
Posted - 2009-05-05 : 16:53:00
|
| Full Error message is:Server: Msg 512, Level 16, State 1, Procedure Update_Activation, Line 6Subquery 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. |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-05-05 : 17:01:35
|
| YTou haven't then posted what is driving the error till now. The update sql from the post before looks good. You'll need to post code for Update_Activation. |
 |
|
|
mgp
Starting Member
9 Posts |
Posted - 2009-05-05 : 17:19:32
|
| Fill free to mail me an easy button=PThank You Sakets.There was a trigger on the db named Update_Activation.I copied it, deleted it and was then sucessful at making the changes=) |
 |
|
|
|
|
|
|
|