If statements on select

Поиск
Список
Период
Сортировка
От Alejandro D. Burne
Тема If statements on select
Дата
Msg-id 8398dc6d05041505136f7165d2@mail.gmail.com
обсуждение исходный текст
Ответы Re: If statements on select  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
Hi, I'm translating an app made with visual foxpro and mysql as rdbms
to postgres.
I've got many querys with this sintax:

select code1, sum(if(cond1, price,0)), sum(if(cond2,price,0)) from ...

may be it's not sql compliant but very usefull
there is a way to do this work on postgres? I can't find any on docs.

Thnx, Alejandro

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

Предыдущее
От: Alex
Дата:
Сообщение: SQL Question
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: SQL Question