Re: Function in selection? - Mailing list pgsql-general

From Dousak "May (Phoebus Apollonus)
Subject Re: Function in selection?
Date
Msg-id 1047583164.1826.34.camel@Grandis
Whole thread Raw
In response to Re: Function in selection?  ("Peter Darley" <pdarley@kinesis-cem.com>)
List pgsql-general
Thanks, I'll try it right away!

May

> May,
>     I think this is what you want.
>
> SELECT CASE WHEN A=0 and B<>0 THEN B*Z.TABLE_Y ELSE A END AS A, CASE WHEN
> A<>0 AND B=0 THEN A/Z.TABLE_Y ELSE B END AS B FROM TABLE_X ORDER BY D, C, E
>
> Thanks,
> Peter Darley


pgsql-general by date:

Previous
From: Eric Audet
Date:
Subject: Droping a database even if someone is connected
Next
From: Charles Hauser
Date:
Subject: timestamp 'default' question