Re: Dynamically created tables [WAS Re: "Relation x

From: Gaurav Priyolkar <gaurav_lists(at)yahoo(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dynamically created tables [WAS Re: "Relation x
Date: 2001-10-17 21:47:50
Message-ID: 20011018031749.C1066@goatelecom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 17, 2001 at 08:59:23AM -0600, Keary Suska wrote:
> I would bet this requirement is really that the SQL SELECT column order must
> match the column order of the report, which is something else entirely. If

Actually, column order does not matter. The requirement is that whatever
columns have to be displayed on the report must be available in he
table/view.

> the number of 'months' columns (per your example) are fixed, and the
> specific months are known ahead of time, you could (theoretically) do
> self-join. This may have to be an outer join if it is possible that there
> were no entries for any particular month.

Therein lies the catch. As in the example, the number of months
columns as well as which months columns are not fixed. If they were,
it would be possible to create the table only once and truncate each
time.

TIA

Regards,
Gaurav.

--
Sleep: A completely inadequate substitute for caffeine.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason Earl 2001-10-17 22:05:14 Re: SQL equivallent to "\ds" in psql
Previous Message Adam Haberlach 2001-10-17 21:46:10 python Backend message type 0x44 arrived while idle