If statements on select

From: "Alejandro D(dot) Burne" <alejandro(dot)dburne(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: If statements on select
Date: 2005-04-15 12:13:40
Message-ID: 8398dc6d05041505136f7165d2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2005-04-15 12:15:00 Re: SQL Question
Previous Message Alex 2005-04-15 11:58:31 SQL Question