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 |
ann
Posting Yak Master
220 Posts |
Posted - 2006-10-05 : 13:26:53
|
how do I use "case when" within my sql statement - I want to pull a field if not null,but if it is null, then pull another fieldex:select casenote (if not null) (else use) satisfynote as notethanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-10-05 : 13:33:17
|
Try this:select columnalias = case when casenote is not null then casenote else satisfynote endfrom yourtableTara Kizer |
 |
|
ann
Posting Yak Master
220 Posts |
Posted - 2006-10-05 : 13:40:32
|
Thanks! that worked perfect, just what I wanted :) |
 |
|
|
|
|