pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: Christoph Haller <ch@rodos.fzk.de>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Generating a cross tab (pivot table)
Date: Fri, 8 Nov 2002 01:39:32 -0800 (PST)
Message-ID: <20021108093932.41983.qmail@web80313.mail.yahoo.com> (raw)
In-Reply-To: <3DCA52E2.5529E893@rodos.fzk.de>


--- 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



view thread (6+ messages)  latest in thread

Message-ID: <20021108093932.41983.qmail@web80313.mail.yahoo.com>
Permalink:  ../20021108093932.41983.qmail@web80313.mail.yahoo.com/
Also on:    postgresql.org/message-id/20021108093932.41983.qmail@web80313.mail.yahoo.com

 · 

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: lud_nowhere_man@yahoo.com, ch@rodos.fzk.de
  Subject: Re: Generating a cross tab (pivot table)
  In-Reply-To: <20021108093932.41983.qmail@web80313.mail.yahoo.com>

* 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