From: Renato Cramer <renato@domsis.com.br>
To: Pgsql-Sql (E-mail) <pgsql-sql@postgresql.org>
Subject: IF statement in Select
Date: Wed, 5 Apr 2006 13:45:25 -0300
Message-ID: <C1C69E45A81644499CED2306D960C155B9D35D@VERTICAL> (raw)
Hello all,
Is the use of IF statement restrict to Functions and Store Procedures?
I'm trying to use an IF within Select...
Example:
create view v1 as
select c1,
c2,
if c3 = 52 then 0
else 1
endif as base_irrf_13
from t1;
Thanks in advance,
Renato Cramer.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: renato@domsis.com.br
Subject: Re: IF statement in Select
In-Reply-To: <C1C69E45A81644499CED2306D960C155B9D35D@VERTICAL>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox