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)
 Case/Update Statement

Author  Topic 

tfreeman03
Starting Member

1 Post

Posted - 2001-11-08 : 14:50:08
I'm having trouble with this statement. Can anyone tell me if this is a valid statement. I'm using SQL Server 2000.

update #temp
set
case @x when 'xyz' then fieldA else FieldB end
=
case @Sum when 123 then 1 else 0 end


My question revolves around whether it's possible or not to use a case statement to evaluate which field you want to update in a table?

thanks
tim


   

- Advertisement -