Re: creating a view from multiple tables (13 tables)

Поиск
Список
Период
Сортировка
От Garris, Nicole
Тема Re: creating a view from multiple tables (13 tables)
Дата
Msg-id 7660B79A29B9D411999F00D0B78EC89009B79A91@NTRK2
обсуждение исходный текст
Ответ на creating a view from multiple tables (13 tables)  (Kumar S <ps_postgres@yahoo.com>)
Ответы Re: creating a view from multiple tables (13 tables)  (Kumar S <ps_postgres@yahoo.com>)
Список pgsql-novice
If you haven't already, you might consider a different structure for your
tables. Instead of the dozen or so tables, combine them all into only one
table, with the same columns as each of the dozen tables. Differentiate
between the "tables" by means of an additional column which designates the
"type" of each record. This new column would have a dozen different possible
values.

-----Original Message-----
From: M. Bastin [mailto:marcbastin@mindspring.com]
Sent: Friday, September 24, 2004 3:04 PM
To: Kumar S
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] creating a view from multiple tables (13 tables)

>psql:/home/../temp/postgres/marray2/view.sql:58:
>ERROR:  column reference "fc_probe_set_id" is ambiguous

You have to use the "table.column" notation.  E.g.
"table12.fc_probe_set_id" instead of just "fc_probe_set_id"

Cheers,

Marc

>In my case every table (13 numbers) has 20 columns and
>column names are identical.
>In the select statement it is difficult to specify
>every table name . column name and do this for 20
>times for every chip.

You obviously have to; since all column names are identical how could
you hope PostgreSQL to be sure which table you mean?

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

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

Предыдущее
От: "M. Bastin"
Дата:
Сообщение: Re: creating a view from multiple tables (13 tables)
Следующее
От: Kumar S
Дата:
Сообщение: Re: creating a view from multiple tables (13 tables)