From: James Orr <james@lrgmail.com>
To: Josh Berkus <josh@agliodbs.com>
To: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Aasmund Midttun Godal <postgresql@envisity.com>
Cc: jeremy@wundt.psychiatry.uiowa.edu
Cc: pgsql-sql@postgresql.org
Subject: Re: transposing data for a view
Date: Thu, 1 Nov 2001 11:54:19 -0500
Message-ID: <007f01c162f5$d9a58ee0$1600000a@lrg.office> (raw)
References: <web-496664@davinci.ethosmedia.com>
> > BTW, I don't believe the self-join approach proposed
> > earlier will work, because joining on "scanid" will
> > create a cartesian type join where the region values
> > will be duplicated (multiplicated!).
>
> Not if you're talking about my query, they won't. I use that query form
> in many projects to create roll-ups; it's the "best" SQL92 approach to
> the "pivot table" problem. However, it will not work in 7.0.3.
I think he might be talking about mine. The region values will not be
duplicated, the WHERE clause prevents it.
I kind of prefer my own query aesthetically, is it as efficient internally?
- James
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: james@lrgmail.com, josh@agliodbs.com, jeff_eckermann@yahoo.com, postgresql@envisity.com, jeremy@wundt.psychiatry.uiowa.edu
Subject: Re: transposing data for a view
In-Reply-To: <007f01c162f5$d9a58ee0$1600000a@lrg.office>
* 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