Re: [SQL] how to: refer to select list calculations other places in the calculations.

2009-09-10 Thread Rob Sargent
-Original Message- From: Rob Sargent [mailto:robjsarg...@gmail.com] Sent: Wednesday, September 09, 2009 11:59 PM To: Little, Douglas Subject: Re: [SQL] how to: refer to select list calculations other places in the calculations. Would reverting to the base columns work? select a, b, a+b as c, (a+b

[SQL] how to: refer to select list calculations other places in the calculations.

2009-09-09 Thread Little, Douglas
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 -