Re: creating a view from multiple tables (13 tables) - Mailing list pgsql-novice

From Garris, Nicole
Subject Re: creating a view from multiple tables (13 tables)
Date
Msg-id 7660B79A29B9D411999F00D0B78EC89009B79A91@NTRK2
Whole thread Raw
In response to creating a view from multiple tables (13 tables)  (Kumar S <ps_postgres@yahoo.com>)
Responses Re: creating a view from multiple tables (13 tables)
List 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 by date:

Previous
From: "M. Bastin"
Date:
Subject: Re: creating a view from multiple tables (13 tables)
Next
From: Kumar S
Date:
Subject: Re: creating a view from multiple tables (13 tables)