pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Tille, Andreas <TilleA@rki.de>
Cc: PostgreSQL SQL <pgsql-sql@postgresql.org>
Subject: Re: Turning column into row
Date: 22 May 2002 10:56:47 +0100
Message-ID: <1022061408.1400.1042.camel@linda> (raw)
In-Reply-To: <Pine.LNX.4.44.0205220806200.8932-100000@wr-linux02.rki.ivbb.bund.de>
References: <Pine.LNX.4.44.0205220806200.8932-100000@wr-linux02.rki.ivbb.bund.de>

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.

-- 
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 
      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 
      the life also of Jesus might be made manifest in our 
      body."        II Corinthians 4:8-10 

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (15+ messages)  latest in thread

Message-ID: <1022061408.1400.1042.camel@linda>
Permalink:  ../1022061408.1400.1042.camel@linda/
Also on:    postgresql.org/message-id/1022061408.1400.1042.camel@linda

 · 

reply

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: olly@lfix.co.uk, TilleA@rki.de
  Subject: Re: Turning column into row
  In-Reply-To: <1022061408.1400.1042.camel@linda>

* 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