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 |
|
BankOfficerHere
Posting Yak Master
124 Posts |
Posted - 2008-09-10 : 03:23:31
|
| Hi I have problem here. I have results on the table:Coaching OpportunityMeets ExpectationsUnacceptableBlank (' ')I want a case statement whereCoaching Opportunity = 1Meets Expectations = 0Unacceptable = 1Blank (' ') = NULL |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-09-10 : 03:25:47
|
[code]case when col = 'Coaching Opportunity' then 1 when col = 'Meets Expectations' then 0 when col = 'Unacceptable' then 1 when col = '' then null end[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-09-10 : 03:42:48
|
CASE col WHEN 'Meets Expectations' THEN 0 WHEN '' THEN NULL ELSE 1 END E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|
|