Select Case
I am trying to use a simple case statement:
SELECT BudgetAccountID, Initial_Budget_Amount, case Initial_Budget_Amount when > '0' then 'yes' else 'no' end as test
FROM BudgetSummary
I keep getting an Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '>'. error.
I've tried removing the ticks from the zero, and casting the Initial_Budget_Amount value as int but I still keep getting the error. I've tried to use other boolean operators as well (=, >=, NOT, etc.) and get the same error. What am I missing?
Thanks