Re: Creating Views on Multiple Identical Tables
Posted in 1997
You can create a view like this. Just put different column names in
brackets after the create view, as in
create view thingy (q1_sales, q2_sales, q3_sales, q4_sales)
as select q1.sales, q2.sales, q3.sales, q4.sales
from ba01_96q1 q1, ba01_96q2 q2, ba01_96q3 q3, ba01_96q4 q4
where (clauses)
This gives you four columns in your view, called q1_sales, q2_sales,
q3_sales and q4_sales.
A bit long winded but possible.
Davin
______________________________ Reply Separator _________________________________
Subject: Creating Views on Multiple Identical Tables
Author: dhinkle@firstam.com at Internet
Date: 9/5/97 11:36 AM
Hey folks,
Is there a way to create a view on a group of tables that have
identical col. names? The tables contain data from the 4 quarters of
the year, ie:
ba01_96q1
ba01_96q2
ba01_96q3
ba01_96q4 etc...
I need to create a view that contains the data from all the tables,
however the following statement errors out:
create view ba01_all as select * from ba01_96q1, ba01_96q2,
ba01_96q3, ba01_96q4.
Is there a way to do this, or am I out of luck?
David J. Hinkle
Systems/Database Administrator email: dhinkle@firstam.com
First American Credco Voice: (619) 929-6000 x6247
5927 Priestly Drive Ste 250 Fax: (619) 929-6011
Carlsbad, CA 92008
---------------------------------------------------------------------------
Why ask Why:
Why are there flotation devices under plane seats
instead of parachutes?
---------------------------------------------------------------------------