var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: IF statement in SQL string
I need to use an IF statement in a SQL string but i don't know if it's possible.
i use an alias to select a value of C, this field is always
greater then 0 but i want to transform it in negative or positive value depending the value of D...
select A, B.....
if D='55' then C else -C as E...
from... etc.. etc...
Is it possible insert IF statment in a select statement?
How is the correct syntax?
Try the following:
select field1, field2, case when d="55" then "result 1"
else "result2" end field3