| From: | Nabil Sayegh <nsmail(at)sayegh(dot)de> |
|---|---|
| To: | Oliver Beddows <oliver-b(at)ntlworld(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: SQL query help - online music shop - labels & styles |
| Date: | 2001-05-18 13:00:45 |
| Message-ID: | 20010518125657.CDE9C14EE62@gerstung3.net-lab.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Asemann | 2001-05-18 16:03:25 | inserting values like in mySQL |
| Previous Message | Oliver Beddows | 2001-05-18 12:20:25 | SQL query help - online music shop - labels & styles |