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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 can anybody help me to solve this issue

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 statement

UPDATE TBL_PDREPORT SET EQPT_PARENT = CASE
WHEN HIPL_ID='HOFPR40227' THEN EQPT_PARENT
ELSE EQPT_PARENT='HOFPR40227'
END

Server: Msg 170, Level 15, State 1, Line 3
Line 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_PARENT
ELSE 'HOFPR40227'
END
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-08-19 : 03:58:49
update tbl_pdreport
set eqpt_parent = 'HOFPR40227'
where HIPL_ID != 'HOFPR40227'


Planning replaces chance by mistake
Go to Top of Page
   

- Advertisement -