From: | Kumar S <ps_postgres(at)yahoo(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | creating a view from multiple tables (13 tables) |
Date: | 2004-09-24 21:08:31 |
Message-ID: | 20040924210831.82891.qmail@web51406.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Dear Group,
I have 13 tables with duplication of elements and
14th tables that has all the unique elements of 13
tables. What I do not have in 14th table are columns
that are part of these 13 tables.
I wanted to male a view with all 14 tables.
My code looks like this:
CREATE VIEW affy_annotation AS
SELECT
affy_unique_probeset.affy_probeset_name,
fc_probe_set_id,
fc_aeneChip_array,
fc_species_scientific_name,
fc_annotation_date,
..........................,
..................
FROM
affy_unique_probeset,
affy_hc_g110,
affy_hg_focus,
affy_********,
affy_********,
*************,
WHERE affy_unique_probeset.affy_probeset_name =
fc_Probe_Set_ID;
=>\i /home/...../..../postgres/marray2/view.sql
psql:/home/../temp/postgres/marray2/view.sql:58:
ERROR: column reference "fc
_probe_set_id" is ambiguous
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.
So could any one let me know how to create a view from
multiple tables.
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | V i s h a l Kashyap @ [Sai Hertz And Control Systems] | 2004-09-24 21:49:34 | List of PL languages in PostgreSQL |
Previous Message | Tom Lane | 2004-09-24 18:47:01 | Re: Using perform in plpgsql throws compile errors |