Re: Help: creating view with different columns?
Date: 1997/04/10
Message-ID: <5iisi2$liu_at_cssun.mathcs.emory.edu>#1/1
Reformat the table as follows:
article number, column_number, data
The article number is the same as you have it, the column_number specifies
which column
contains data, and the data is the data ( may not be needed if X is your
only data).
The table will no longer be sparsely populated. As to your view, you may
want
to create a temp table to show the data the way you need it from this
table.
( I don't have your original description of the problem, so excuse me if
this
solution leaves out some detail I'm not aware of).
Please respond to weberj_at_schwend.de
To: informix-list _at_ rmy.emory.edu
cc: (bcc: Kate Tomchik/IS/SSC/THD)
Subject: Help: creating view with different columns?
Together there are over 300 columns.
Your solution would work but I would have to specify
a query with almost 300 NULL= fields.
Also it seems there is no dbms
that supports so many columns in one table.
Furthermore it seems that empty table fields
take space, too, so it is a great waste of storage.
So the idea is to create several tables each containing data
of similar articles.
These tables should be put together by a view to simulate
a table that contains everything. The tables should be
*updateable* via the view.
Ideally I?d like to have a view like
CREATE VIEW V AS
SELECT * FROM T1
UNION
SELECT * FROM T2
UNION
....
UNION
SELECT * FROM Tn
If I change an article via the view the DBMS should know in which single table the article is because the article numbers are unique.
I think what I want is impossible, but maybe there is a solution out there?
Thanks for your hints.
-- Juergen Weber Computer Scientist in the Prepress Business email: weberj_at_schwend.de www: http://www.schwend.deReceived on Thu Apr 10 1997 - 00:00:00 CEST