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 |
DURGESH
Posting Yak Master
105 Posts |
Posted - 2008-08-18 : 23:52:24
|
hi all,i am getting an error when using case in update statementUPDATE TBL_PDREPORT SET EQPT_PARENT = CASE WHEN HIPL_ID='HOFPR40227' THEN EQPT_PARENT ELSE EQPT_PARENT='HOFPR40227'ENDServer: Msg 170, Level 15, State 1, Line 3Line 3: Incorrect syntax near '='. |
|
singularity
Posting Yak Master
153 Posts |
Posted - 2008-08-19 : 00:05:40
|
UPDATE TBL_PDREPORT SET EQPT_PARENT = CASE WHEN HIPL_ID='HOFPR40227' THEN EQPT_PARENTELSE 'HOFPR40227'END |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-08-19 : 03:58:49
|
update tbl_pdreportset eqpt_parent = 'HOFPR40227'where HIPL_ID != 'HOFPR40227' Planning replaces chance by mistake |
 |
|
|
|
|