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 |
|
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2010-04-07 : 05:52:41
|
I've as follow,update t1 set a = 5 where b =7update t1 set a = 13 where b =4update t1 set a = 1 where b =6update t1 set a = 5 where b =9 It's possible above statement merged into single statement? If possible, how it's look's like? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-04-07 : 05:54:51
|
[code]update t1set a = case b when 4 then 13 when 6 then 1 when 7 then 5 when 9 then 5 endwhere b in (4, 6, 7, 9)[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2010-04-07 : 06:01:26
|
| tq sir |
 |
|
|
|
|
|