If statements on select - Mailing list pgsql-general

From Alejandro D. Burne
Subject If statements on select
Date
Msg-id 8398dc6d05041505136f7165d2@mail.gmail.com
Whole thread Raw
Responses Re: If statements on select
List 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 by date:

Previous
From: Alex
Date:
Subject: SQL Question
Next
From: Thomas Kellerer
Date:
Subject: Re: SQL Question