Re: Creating Views on Multiple Identical Tables
Posted in 1997
Colin McGrath (cmm@trac3000.ueci.com) wrote:
: > >|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
: Doesn't work yet with INFORMIX-OnLine Dynamic Server Version 7.22.FC2 on
: a DEC alpha, you still get a syntax error on the line with the word "UNION".
Ahhhhhhh, but I spoke too soon, there's another way to do it, maybe.
Given two tables, table1(name char(10)), table2(name char10), you can make it
work using a (slap my hands!!!!) disjoint join.
create view awful_view asselect table1.name firstname, table2.name secondname
from table1,table2;
This depends upon whether or not you can live with the disjoint join on
table1,table2. If they're small, it won't generate too big a result set. If
you have a field that you can join the two tables on, you'll avoid the disjoint join.
Joe
: --
: _____________________________________________________________________
: | Colin McGrath cmm@trac3000.ueci.com |
: | Raytheon Engineers & Constructors, Inc. (215) 422-4144 |
: | Phila, PA, USA Standard Disclaimers Apply |
: |___________________________________________________________________|
--
---------------------------------------------------------------------------
Joe Lumbley(jlumbley@netcom.com)
---------------------------------------------------------------------------