On 2/18/17 at 3:33 AM, Egon Frerich wrote:

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'.

Examples in 4.2.14

SELECT CASE WHEN a > 0 THEN a ELSE b END FROM <money_table> WHERE <whatever>;

Regards
Gavan Schneider



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to