From: PFC <lists@boutiquenumerique.com>
To: Thomas Borg Salling <tbs@navicon.dk>
To: pgsql-sql@postgresql.org
Subject: Re: "Flattening" query result into columns
Date: Tue, 22 Mar 2005 01:35:15 +0100
Message-ID: <op.sn0jw1c8th1vuj@localhost> (raw)
In-Reply-To: <20050321215723.E79E356388@svr1.postgresql.org>
References: <20050321215723.E79E356388@svr1.postgresql.org>
You could use the array_accum aggregate. See examples in the docs.
On Mon, 21 Mar 2005 22:57:13 +0100, Thomas Borg Salling <tbs@navicon.dk>
wrote:
> I am looking for a way to "flatten" a query result, so that rows are
> "transposed" into columns, just as asked here for oracle:
>
> http://groups.google.dk/groups?hl=da
> <http://groups.google.dk/groups?hl=da&lr=&client=firefox-a&rls=org.mozilla:e
> n-US:official&selm=aad10be0.0401292322.7b6c320b%40posting.google.com>
> &lr=&client=firefox-a&rls=org.mozilla:en-US:official&selm=aad10be0.040129232
> 2.7b6c320b%40posting.google.com
>
>
> Is there any way to do this with pgsql ?
>
>
> Thanks,
>
> /Thomas.
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lists@boutiquenumerique.com, tbs@navicon.dk
Subject: Re: "Flattening" query result into columns
In-Reply-To: <op.sn0jw1c8th1vuj@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox