IF statement in Select

From: Renato Cramer <renato(at)domsis(dot)com(dot)br>
To: "Pgsql-Sql (E-mail)" <pgsql-sql(at)postgresql(dot)org>
Subject: IF statement in Select
Date: 2006-04-05 16:45:25
Message-ID: C1C69E45A81644499CED2306D960C155B9D35D@VERTICAL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message William Leite Araújo 2006-04-05 17:04:21 Re: IF statement in Select
Previous Message Michael Burke 2006-04-05 15:57:09 SELECT composite type