Re: SQL query help - online music shop - labels & styles - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: SQL query help - online music shop - labels & styles
Date
Msg-id 20010518125657.CDE9C14EE62@gerstung3.net-lab.net
Whole thread Raw
In response to SQL query help - online music shop - labels & styles  (Oliver Beddows <oliver-b@ntlworld.com>)
List pgsql-novice
On 18 May 2001 13:20:25 +0100, Oliver Beddows wrote:
> Which produces the following:
> ----------------------
>   label                        |  style
> ----------------------
>  Matsuri Productions | House
>  Matsuri Productions | Techno
>  Matsuri Productions | Trance
>
> BUT! How can I achieve the following??
> --------------------------------
>   label                        | style1   | style2   | style3
> -------------------------------
>  Matsuri Productions | House  | Techno | Trance


Several times I asked if there is a SQL-way to transpone.
As I didn't get an answer I believe the answer is no.

If there was such a function it would have to take care of at least the
following:
The contents of the first column of table t has to follow the
conventions for column-names.
Columns 1..n of t have to be of the same type.
...

Perhaps it is possible to write a plpgsql-function for it,
but propably it's not worth the effort.

cu

--
Nabil Sayegh



pgsql-novice by date:

Previous
From: Oliver Beddows
Date:
Subject: SQL query help - online music shop - labels & styles
Next
From: Nabil Sayegh
Date:
Subject: Re: Problems with getting the postmaster to startup with -i option.