A
Adam Clauss
I need to perform a SQL operation where depending on the value of column A,
either the value of column B or column C might be returned.
Something like:
SELECT If(ColA = 1, ColB, ColC) As Total FROM mytable;
Result would be one column, Total. If column A's value was 1, the value of
total would be ColB, else ColC.
Is this possible?
Thanks!
Adam Clauss
(e-mail address removed)
either the value of column B or column C might be returned.
Something like:
SELECT If(ColA = 1, ColB, ColC) As Total FROM mytable;
Result would be one column, Total. If column A's value was 1, the value of
total would be ColB, else ColC.
Is this possible?
Thanks!
Adam Clauss
(e-mail address removed)