Re: Generating a cross tab (pivot table) - Mailing list pgsql-sql

From Ludwig Lim
Subject Re: Generating a cross tab (pivot table)
Date
Msg-id 20021108093932.41983.qmail@web80313.mail.yahoo.com
Whole thread Raw
In response to Generating a cross tab (pivot table)  (Christoph Haller <ch@rodos.fzk.de>)
List pgsql-sql
--- Christoph Haller <ch@rodos.fzk.de> wrote:
> It's obvious this approach is most inflexible.
> As soon as there is a new vendor, one has to
> re-write the query and add
> SUM(CASE vendor WHEN 'mr. new' THEN ... ,
> 

> In an advanced example it is shown how to deal with
> cross tabs in
> general
> using a stored procedure. I am going to translate
> this and re-write it
> for postgres, too (ok, I will try).
I saw something that might somewhat a bit more
flexible solution using SQL. I don't know it it work
in PostgreSQL. I saw it at the MySQL site.   The following is the URL: http://www.mysql.com/articles/wizard/index.html
 Has anyone tried this on a PostgreSQL database ?

regards,
ludwig


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: Re: PLpgSQL FOR IN EXECUTE question
Next
From: Christoph Haller
Date:
Subject: Re: query optimization question