Re: Function in selection?

From: Dousak "May (Phoebus Apollonus)" <phoebus(at)email(dot)si>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Function in selection?
Date: 2003-03-13 19:19:24
Message-ID: 1047583164.1826.34.camel@Grandis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Audet 2003-03-13 19:19:39 Droping a database even if someone is connected
Previous Message Dousak May (Phoebus Apollonus) 2003-03-13 19:17:31 Re: Function in selection?