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

Поиск
Список
Период
Сортировка
От Gaurav Priyolkar
Тема Re: Dynamically created tables [WAS Re: "Relation x
Дата
Msg-id 20011018031749.C1066@goatelecom.com
обсуждение исходный текст
Ответ на Re: Dynamically created tables [WAS Re: "Relation x  (Keary Suska <hierophant@pcisys.net>)
Список 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.
Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Adam Haberlach
Дата:
Сообщение: python Backend message type 0x44 arrived while idle
Следующее
От: Jason Earl
Дата:
Сообщение: Re: SQL equivallent to "\ds" in psql