Re: Reuse previously calculated column in sql query? - Mailing list pgsql-sql

From Rod Taylor
Subject Re: Reuse previously calculated column in sql query?
Date
Msg-id 1098277537.747.91.camel@home
Whole thread Raw
In response to Reuse previously calculated column in sql query?  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
List pgsql-sql
On Wed, 2004-10-20 at 08:50, Philippe Lang wrote:
> Hello,
> 
> Is it possible to reuse a previously calculated column in a following
> column, like:

SELECT col1    , col2    , col2 * 0.75 AS col3 FROM (SELECT foo.val1 AS col1            , long_calculation(foo.val1) AS
col2        FROM foo) AS tab;
 




pgsql-sql by date:

Previous
From: "Philippe Lang"
Date:
Subject: Reuse previously calculated column in sql query?
Next
From: Weiping
Date:
Subject: Re: the problem of createlang!