Author |
Topic |
IK1972
56 Posts |
Posted - 2013-02-28 : 16:57:08
|
I have one table with 5 columnsComments, Table1, Table2, Table3, Table4null, A, B, C, Dnull, F, B, A, Gnull, A, S, B, Dnull, E, A, J, Snow i want to update like thatupdate t set Comments = Comments + case when t.Table1 = 'A' then 'Table1--' when t.Table2 = 'B' then 'Table2--'from #temp After update My Expected Result isComments, Table1, Table2, Table3, Table4Table1--Table2, A, B, C, DTable2, F, B, A, GTable1, A, S, B, Dnull, E, A, J, SPlease not suggest to check both column in same case as here I mention very simple condition actualy I have table with 150 columns and with different check and I want to mention comments when cretira match.Thanks |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2013-02-28 : 17:43:28
|
Dupe:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=183369 |
|
|
|
|
|