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

From: "Garris, Nicole" <Nicole(dot)Garris(at)dof(dot)ca(dot)gov>
To: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: creating a view from multiple tables (13 tables)
Date: 2004-09-24 22:57:00
Message-ID: 7660B79A29B9D411999F00D0B78EC89009B79A91@NTRK2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mindspring(dot)com]
Sent: Friday, September 24, 2004 3:04 PM
To: Kumar S
Cc: pgsql-novice(at)postgresql(dot)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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Kumar S 2004-09-25 02:11:54 Re: creating a view from multiple tables (13 tables)
Previous Message M. Bastin 2004-09-24 22:04:13 Re: creating a view from multiple tables (13 tables)