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

Поиск
Список
Период
Сортировка
От Little, Douglas
Тема how to: refer to select list calculations other places in the calculations.
Дата
Msg-id A434C531E37AD442815608A769550D80590432A1BC@EGEXCMB01.oww.root.lcl
обсуждение исходный текст
Ответы Re: how to: refer to select list calculations other places in the calculations.  (Bernd.Nawothnig@t-online.de (Bernd Nawothnig))
Список pgsql-sql
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I have very complex sql (generated by cognos) I’m porting from Teradata that basically uses column
aliasin the calculated columns. </span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">Is there any way to do this type of thing in Psql?</span></font><p class="MsoNormal"><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">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)   </span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">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
usedin other calculations.</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial">from ....</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><strong><b><font face="Arial" size="2"><span style="font-size:
10.0pt;font-family:Arial">Doug Little</span></font></b></strong><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">Sr. Data Warehouse Architect | Enterprise Data Management | Orbitz Worldwide </span></font><p
class="MsoNormal"style="margin-right:-1.25in"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">500W. Madison, Suite 1000  Chicago IL 60661| Office 312.260.2588 | Fax
312.894.5164| Cell 847-997-5741</span></font><h3 style="margin:0in;margin-bottom:.0001pt"><strong><b><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial;font-weight:normal"><a href="mailto:Douglas.Little@orbitz.com"
title="mailto:dlittle@orbitz.com"><b><span
style="font-weight:bold">Douglas.Little@orbitz.com</span></b></a></span></font></b></strong><span
class="MsoHyperlink"><u><fontcolor="blue"></font></u></span></h3><p><font face="Times New Roman" size="3"><span
style="font-size:12.0pt"> <imgborder="0" height="61" id="_x0000_i1025" src="cid:image002.jpg@01CA3127.61E69F30"
width="83"/>  <a href="http://www.orbitz.com/" title="http://www.orbitz.com/"><font face="Arial" size="1"><span
style="font-size:
8.0pt;font-family:Arial"><span title="http://www.orbitz.com/">orbitz.com</span></span></font></a> <font
color="blue"><spanstyle="color:blue">|</span></font> <a href="http://www.ebookers.com/"
title="http://www.ebookers.com/"><fontface="Arial" size="1"><span style="font-size:8.0pt;font-family:Arial"><span
title="http://www.ebookers.com/">ebookers.com</span></span></font></a><font color="blue"><span
style="color:blue">|</span></font><a href="http://www.hotelclub.com/" title="http://www.hotelclub.com/"><font
face="Arial"size="1"><span style="font-size:8.0pt;font-family:Arial"><span
title="http://www.hotelclub.com/">hotelclub.com</span></span></font></a><font color="blue"><span
style="color:blue">|</span></font><a href="http://www.cheaptickets.com/" title="http://www.cheaptickets.com/"><font
face="Arial"size="1"><span style="font-size:8.0pt;font-family:Arial"><span
title="http://www.cheaptickets.com/">cheaptickets.com</span></span></font></a><font color="blue"><span
style="color:blue">|</span></font><a href="http://www.ratestogo.com/" title="http://www.ratestogo.com/"><font
face="Arial"size="1"><span style="font-size:8.0pt;font-family:Arial"><span
title="http://www.ratestogo.com/">ratestogo.com</span></span></font></a><fontcolor="blue"><span style="color:blue">
|</span></font><a href="http://www.asiahotels.com/" title="http://www.asiahotels.com/"><font face="Arial"
size="1"><spanstyle="font-size:8.0pt;font-family:Arial"><span
title="http://www.asiahotels.com/">asiahotels.com</span></span></font></a> </span></font><pclass="MsoNormal"><font
face="TimesNew Roman" size="3"><span style="font-size: 
12.0pt"> </span></font></div>

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Oliveiros C,"
Дата:
Сообщение: Differences between bit string constant sintax
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: trigger failed to identify the partions