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 |
|
sardinka
Posting Yak Master
142 Posts |
Posted - 2005-05-19 : 09:00:12
|
| can I do something like this in update statementupdate test set Code= Case When Action='D' then 'Failed'end,from test1 |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-05-19 : 09:22:08
|
yes.Corey Secret Service Agent: Mr. President, you're urinating on me.President Lyndon Johnson: I know I am. It's my prerogative. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-05-19 : 09:30:40
|
| Yes. How is test is related with test1? if code is the column of the two tables use alias nameupdate test set Code=Case When t1.Action='D' then 'Failed' end from test1 MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|