On Sat, Feb 18, 2017 at 9:33 AM, Egon Frerich <e...@frerich.eu> 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'. https://www.postgresql.org/docs/9.6/static/functions-conditional.html SELECT CASE WHEN a > 0 THEN a ELSE b END AS a_or_b FROM tbl; David J.