From: Neil Dugan <postgres@butterflystitches.com.au>
To: pgsql-sql@postgresql.org
Subject: joining two simular (but not identical tables)
Date: Sun, 04 Sep 2005 22:19:12 +1000
Message-ID: <1125836352.7221.7.camel@localhost.localdomain> (raw)
I have two similar but not identical tables.
I would like to create a view that combines the contents of both tables
into a single view, where each record in each table is visible as a
separate record in the view.
table a
Column | Type | Modifiers
---------------+-----------------------+-----------
prcode | character varying(12) |
descr | character varying(55) |
rrp | numeric(10,5) |
sugcusmkdn | numeric(6,2) |
customerpr | numeric(7,2) |
costpr | numeric(11,6) |
lengths | character(1) |
profitpercent | numeric(6,2) |
table b
Column | Type | Modifiers
---------------+-----------------------+-----------
prcode | character varying(12) |
descr | character varying(55) |
rrp | numeric(10,5) |
customerpr | numeric(7,2) |
supdis | numeric(6,3) |
costpr | numeric(11,6) |
lengths | character(1) |
profitpercent | numeric(6,2) |
dnprice | numeric(7,2) |
stcode | character varying(18) |
dnprofit | numeric(5,2) |
Thanks for any help.
Regards Neil.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgres@butterflystitches.com.au
Subject: Re: joining two simular (but not identical tables)
In-Reply-To: <1125836352.7221.7.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox