Home Forums SQL Server 2005 Working with Oracle Case statemants in an SQL update query RE: Case statemants in an SQL update query
Dan Murray
Right there with Babe
Points: 779
More actions
May 27, 2008 at 12:06 pm
#820736
Sql Server syntax for updating using a case statement:
update table_1
set Datum2=(case when datum1='1' then 'One'
when datum1='2' then 'two'
when datum1='3' then 'three'
else 'four' end)