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 |
|
sharona
Yak Posting Veteran
75 Posts |
Posted - 2011-03-07 : 15:01:00
|
| i have a query that updates values into a column in a temp table if the note value is = to the 'note_rapid_resp_recommendations_ft1'i have some users that dont have that particular note value but i would null inserted or blank if they dont have the value, how do i do that?UPDATE #FinalSET AIRWAY_BREATHING = r.Value_TEXTFROM #Result r, #Final fWHERE f.ClientDocGUID = r.ClientDocGUIDAND r.name = 'note_rapid_resp_recommendations_ft1' |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2011-03-07 : 17:16:44
|
| I'm not clear if this is the logic you want implemented but....[CODE]UPDATE #FinalSET AIRWAY_BREATHING = case when r.name = 'note_rapid_resp_recommendations_ft1' then NULL else r.Value_TEXT endFROM #Result r, #Final fWHERE f.ClientDocGUID = r.ClientDocGUID[/CODE]This "should" update to r.Value_TEXT unless the Name is your special string.=======================================Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986) |
 |
|
|
|
|
|