Re: Referencing function value inside CASE..WHEN

From: "F(dot) BROUARD / SQLpro" <sqlpro(at)club-internet(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Referencing function value inside CASE..WHEN
Date: 2011-06-19 18:56:38
Message-ID: 4DFE4666.4020004@club-internet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Le 19/06/2011 04:27, lover boi a écrit :
> SELECT
> MY_FUNCTION(...) AS my_function,
> CASE WHEN my_function = '...' THEN '...' ELSE '...' END
> ...
> ...

WITH
T AS
(SELECT MY_FUNCTION(...) AS my_function, ...
)
SELECT CASE WHEN my_function = '...' THEN '...' ELSE '...' END
...
...

A +
--

Frédéric BROUARD - expert SGBDR et SQL - MVP SQL Server - 06 11 86 40 66
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Enseignant Arts & Métiers PACA, ISEN Toulon et CESI/EXIA Aix en Provence
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
*********************** http://www.sqlspot.com *************************

In response to

Browse pgsql-general by date

  From Date Subject
Next Message F. BROUARD / SQLpro 2011-06-19 19:05:54 Re: Search for lists
Previous Message Alexander Farber 2011-06-19 18:51:10 Re: PostgreSQL 8.4.8 bringing my website down every evening