crosstab - pivot - transpose

From: "SunWuKung" <Balazs(dot)Klein(at)t-online(dot)hu>
To: pgsql-general(at)postgresql(dot)org
Subject: crosstab - pivot - transpose
Date: 2007-01-11 17:19:08
Message-ID: 1168535947.884116.50410@i39g2000hsf.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I will need to create a crosstab representation of my resultset.
The resultset looks like this: rowid, columnid, cellvalue
I don't know beforehand the number of columns and their id's but they
will be close to 200.

I have looked at the crosstab tablefunction but it seems that you have
to know your data in advance to use that. I looked at the posts here
and many said that it can (only/easily) be done in a language like
plperl.

Does somebody have an example for this simple case?

Thanks for the help.
Balázs

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Earl 2007-01-11 17:21:02 Checkpoint request failed on version 8.2.1.
Previous Message Scott Ribe 2007-01-11 15:47:42 Re: Cluster all tables in database to PK index