Search Postgresql Archives

If statements on select

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux