Re: create view
Posted in 2000
Cyril MONDIERE wrote:
> I want to create a view with an "union" statement.
>
> Ex :
> create wiew articles (a_id, a_name)
> as
> select a1_id, a1_name
> from article1
> union
> select a2_id, a2_name
> from article2>
> It doesn't work ... SYNTAX ERROR on the UNION statement...
> What is the good syntax ???
As Erik Stahlhut pointed out, you mistyped VIEW as WIEW in your
question. However, that would simply generate a syntax error on the
CREATE line, not a message about UNION. So, you have an old version of
the database that does not allow views to use the UNION clause. I
believe 7.3x and 9.2x are the versions that allow union views; I don't
know about 8.x.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"