On Mon, Aug 24, 2009 at 12:54:31PM +0200, Alban Hertroys wrote: > CASE > WHEN fieldA IS NOT NULL THEN fieldA > WHEN fieldB IS NOT NULL THEN fieldB > WHEN fieldC IS NOT NULL THEN fieldC > ELSE fieldD > END
BTW, the above expression is identical to: COALESCE(fieldA,fieldB,fieldC,fieldD) -- Sam http://samason.me.uk/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general