I have a table with two columns with type money. If column 'a' has an
amount > 0 then this amount is wanted else the amount from column 'b'.
SELECT CASE WHEN a > 0 THEN a ELSE b END AS a_or_b FROM tbl;
David J.
I have a table with two columns with type money. If column 'a' has an
amount > 0 then this amount is wanted else the amount from column 'b'.