Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 4ABAB4758A7 for ; Wed, 22 May 2002 05:57:10 -0400 (EDT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by postgresql.org (Postfix) with ESMTP id 12CBB475CD0 for ; Wed, 22 May 2002 05:57:08 -0400 (EDT) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 17ASrO-000BaH-0U; Wed, 22 May 2002 10:56:46 +0100 Received: from localhost ([127.0.0.1] helo=localhost.localdomain ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 17ASrQ-00068R-00; Wed, 22 May 2002 10:56:48 +0100 Subject: Re: Turning column into row From: Oliver Elphick To: "Tille, Andreas" Cc: PostgreSQL SQL In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-fevCfyVDLPtczv1z46Tu" X-Mailer: Ximian Evolution 1.0.5 Date: 22 May 2002 10:56:47 +0100 Message-Id: <1022061408.1400.1042.camel@linda> Mime-Version: 1.0 X-Archive-Number: 200205/225 X-Sequence-Number: 7860 --=-fevCfyVDLPtczv1z46Tu Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2002-05-22 at 08:35, Tille, Andreas wrote: >=20 > So I have to turn the different properties according to one item into > one field insead of one column. >=20 > 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. --=20 Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C "We are troubled on every side, yet not distressed; we=20 are perplexed, but not in despair; persecuted, but not forsaken; cast down, but not destroyed; Always bearing about in the body the dying of the Lord Jesus, that=20 the life also of Jesus might be made manifest in our=20 body." II Corinthians 4:8-10=20 --=-fevCfyVDLPtczv1z46Tu Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA862tfYU1MND4dDBwRAsU9AJwJqI7Il5x4rRqJhygAFtSDBGD+iACgiM+D bWE1//hRCIBwupXB5dU1FVo= =ZBYN -----END PGP SIGNATURE----- --=-fevCfyVDLPtczv1z46Tu--