Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 5A5BD475F0A for ; Wed, 22 May 2002 11:27:07 -0400 (EDT) Received: from temp.joelburton.com (unknown [209.190.238.101]) by postgresql.org (Postfix) with ESMTP id 9BA2047596A for ; Wed, 22 May 2002 11:22:16 -0400 (EDT) Received: from joeltf0d13cyyp (unknown [209.190.238.100]) by temp.joelburton.com (Postfix) with SMTP id 62C452BE14; Wed, 22 May 2002 10:57:31 -0400 (EDT) From: "Joel Burton" To: "Oliver Elphick" , "Tille, Andreas" Cc: "PostgreSQL SQL" Subject: Re: Turning column into row Date: Wed, 22 May 2002 09:14:25 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <1022061408.1400.1042.camel@linda> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200205/244 X-Sequence-Number: 7879 > -----Original Message----- > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Oliver Elphick > Sent: Wednesday, May 22, 2002 5:57 AM > To: Tille, Andreas > Cc: PostgreSQL SQL > Subject: Re: [SQL] Turning column into row > > > On Wed, 2002-05-22 at 08:35, Tille, Andreas wrote: > > > > So I have to turn the different properties according to one item into > > one field insead of one column. > > > > How to do this sanely? > > > Use Perl? > > According to Joe Celko's book, SQL For Smarties, Sybase provides a > LIST() aggregate function that does this. But I don't know of anything > in PostgreSQL. http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=13 9 will do as a LIST() replacement. - J