IF statement in Select

Поиск
Список
Период
Сортировка
От Renato Cramer
Тема IF statement in Select
Дата
Msg-id C1C69E45A81644499CED2306D960C155B9D35D@VERTICAL
обсуждение исходный текст
Ответы Re: IF statement in Select  ("William Leite Araújo" <william.bh@gmail.com>)
Список 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 0else 1endif as base_irrf_13from t1;

Thanks in advance,

Renato Cramer.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael Burke
Дата:
Сообщение: SELECT composite type
Следующее
От: "William Leite Araújo"
Дата:
Сообщение: Re: IF statement in Select