From: | "G(dot) J(dot) Walsh" <gjwalsh(at)dscdirectionalservices(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | combining tables |
Date: | 2008-10-26 01:02:39 |
Message-ID: | 1224982959.1286.14.camel@www.dscdirectionalservices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I have a situation now where I have a group of 4 tables within one
database. All tables make use of the code defined in the first column as
the primary key.
1 of the 4 tables has the complete range of keys, in this case about
1,000. The other 3 tables have data representing most but not all of
those keys, and in different sets. I want to end up with a new
'combined' table which will allow me to immediately 'see' missing data
from the 3 smaller tables and take the necessary steps to 'fill in the
blanks'. I realize I would of course have to create that table without
constrictions other than the primary key.
My <<< shaky >>> understanding from the manual is that I could use
something like:
SELECT * FROM tmain,tsub1,tsub2,tsub3 NATURAL INNER JOIN tcombo
Am I on the right track?
Thanks for any heads up you'd be kind enough to provide.
George
From | Date | Subject | |
---|---|---|---|
Next Message | Cliff Nieuwenhuis | 2008-10-26 04:59:28 | Re: combining tables |
Previous Message | Oliveiros Cristina | 2008-10-24 12:05:44 | Re: [INSERT]Insert blank values |