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 |
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2011-09-23 : 10:31:52
|
Hi Team,can you correct me if my query is wrong...UPDATE TASK SET TASK__ID = NULLThanks in advance...my aim is to make all the values in this column as null.ArnavEven you learn 1%, Learn it with 100% confidence. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-09-23 : 10:34:06
|
it is correct so far... No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-23 : 10:34:39
|
this is correct. just check it select count(*) from TASK WHERE TASK_ID IS NULL this count should be same as actual table count------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2011-09-23 : 10:39:48
|
Hi Team,there is a trigger on this column. may be that is the reason i'm getting the below error. please suggest me.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.ArnavEven you learn 1%, Learn it with 100% confidence. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-23 : 10:42:22
|
yep. its error from trigger. my guess is you're trying to populate a variable with contents from inserted/deleted and since your update is set based there are multiple records in them which is why this error.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-09-23 : 10:43:16
|
we suggest you to show the table structure and the trigger code... No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|