I am trying to convert:
My statement is:
SUM(CASE [Apr] WHEN ([Apr] < 0) THEN -1 WHEN ([Apr] >= 0) THEN 1 ELSE NULL END) as Apr
[Apr] is an int which accepts Nulls.
Any ideas why this is not working?
Remove [Apr] after CASE when doing comparisions in WHEN
SUM(CASE WHEN ([Apr] < 0) THEN -1 WHEN ([Apr] >= 0) THEN 1 ELSE NULL END) as Apr
Get ride of the [Apr] after CASE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With