how to: refer to select list calculations other places in the calculations. - Mailing list pgsql-sql

From Little, Douglas
Subject how to: refer to select list calculations other places in the calculations.
Date
Msg-id A434C531E37AD442815608A769550D80590432A1BC@EGEXCMB01.oww.root.lcl
Whole thread
Responses Re: how to: refer to select list calculations other places in the calculations.
List pgsql-sql

Hi,

I have very complex sql (generated by cognos) I’m porting from Teradata that basically uses column alias in the calculated columns.

Is there any way to do this type of thing in Psql?

 

Essentially I need to do is refer to a calculated column later in the select list (but far more complex – like 50 pages printed out)  

sel a,b,a+b as c, c*d, c*f, c*g, c*h, c*I, c*j, c*k,……       ---  where c is a calculated column used in other calculations.

from ....

 

 

Doug Little

Sr. Data Warehouse Architect | Enterprise Data Management | Orbitz Worldwide

500 W. Madison, Suite 1000  Chicago IL 60661| Office 312.260.2588 | Fax 312.894.5164 | Cell 847-997-5741

Douglas.Little@orbitz.com

   orbitz.com | ebookers.com | hotelclub.com | cheaptickets.com | ratestogo.com | asiahotels.com 

 

pgsql-sql by date:

Previous
From: "Oliveiros C,"
Date:
Subject: Differences between bit string constant sintax
Next
From: Richard Huxton
Date:
Subject: Re: trigger failed to identify the partions