Re: How to transform table rows into Colum?

Поиск
Список
Период
Сортировка
От Richard Albright
Тема Re: How to transform table rows into Colum?
Дата
Msg-id 4D8240E7.1030008@insiderscore.com
обсуждение исходный текст
Ответ на How to transform table rows into Colum?  (Eric Ndengang <eric.ndengang_foyet@affinitas.de>)
Список pgsql-sql
you can also generate a crosstab table using the sign function<br /><br /> you can check out the link below ( its a
sqlitetutorial, but the same idea will work for pg too )<br /><br /><a
href="http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html">http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html</a><br
/><br/><br /> On 03/09/2011 12:16 PM, Eric Ndengang wrote: <blockquote cite="mid:4D77B5FC.6010502@affinitas.de"
type="cite">HiGuys, <br /> I have the following table: <br /><br /> Name   Value   rang  salary <br />
------------------------------------<br /> name1   value1  1    2500 <br /> name2   value2  2    2600 <br /> name3  
value3 3    300 <br /><br /> and want to obtain the following result: <br /><br /> name1  name2  name3 <br />
------------------------------------<br /> value1  value2   value3 <br /> 1             2            3 <br /> 2500     
2600   300 <br /><br /> what should i do ? I read about the crosstab function  in postgresql but still have no idea on
howto use it to solve this problem. <br /> Any help would be appreciated <br /> Regards <br /><br /></blockquote><br
/><br/><div class="moz-signature">-- <br /><b>Rick Albright</b><br /> Senior Quantitative Analyst <br /> Web: <a
href="https://www.insiderscore.com/">www.insiderscore.com</a><br/> Email: <a
href="mailto:ralbright@insiderscore.com">ralbright@insiderscore.com</a></div>

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

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: Bizarreness at A2 Hosting
Следующее
От: "Good, Thomas"
Дата:
Сообщение: Re: Bizarreness at A2 Hosting