On 2013-02-07, JORGE MALDONADO <jorgemal1...@gmail.com> wrote:

> Can I use a conditional expression in an UPDATE query like this:
>
> UPDATE table_1 SET
> field_1 =
> CASE WHEN (condition) THEN (COALESCE(query_1, -1))
>           ELSE (COALESCE(query_1, -2))
> END
>

yesh, that should work.

-- 
⚂⚃ 100% natural



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

Reply via email to