Re: CREATE VIEW + UNION
Posted in 1996
The reason you can't use union in a view is if you have a union in your select
something like this:
select * from v01
union
select * from t02
This query supposedly has no meaning.
It does to me as long as the column data types match up.
You can read the restrictions on views in Informix Guide to SQL Tutorial
Version 4.10, page 11-18.
Scott
-----------------------------------------------------------------------------
} Create a view with "UNION" ?
}>}-----------
}>} Is it possible to create a view with the function like union?
}>}We have many databases located in different informix database servers.
}>}Some tables in different servers have identical columns. We want to
}>}create a view which will "UNION" them.
}>}
}>}For example:
}>}
}>} CREATE VIEW v01 AS
}>} SELECT * FROM d01@server1.t01
}>} UNION
}>} SELECT * FROM d01@server2.t01
}>} UNION
}>} SELECT * FROM d01@server3.t01
}>} ...
}>}
}>}How can I do it ?
}>
}>
}
==================================================================
Scott Rubin, FourGen Software (Client Services)
scottr@fourgen.com