RE: Create View with a UNION ?
Posted in 2000
What is your Informix version? What is the error message?
In pre-IDS 7.3 releases, Informix did not support a UNION clause
within a view.
-----Original Message-----
From: Gail [mailto:wormang@sutterhealth.org]
Sent: Monday, March 06, 2000 4:35 PM
To: informix-list@iiug.org
Subject: Create View with a UNION ?
Hello All,
Can you create a view using a UNION statement? I'm new at writing Informix
SQL and I am receiving an error when I execute the SQL below. Any help will
be appreciated.
Thanks!
Gail
CREATE VIEW testgail
(activity,
fiscal_year,
period,
r_system,
atn_obj_id,
tran_amount)AS SELECT
accommitx.activity,
accommitx.fiscal_year,
accommitx.period,
accommitx.r_system,
accommitx.atn_obj_id,
accommitx.tran_amount
FROM
xxxx.accommitx accommitx
WHERE
accommitx.activity = '47049009'
UNION
AS SELECT
actrans.activity,
actrans.fiscal_year,
actrans.period,
actrans.r_system,
actrans.obj_id,
actrans.tran_amount
FROM
xxxx.actrans actrans
WHERE
actrans.activity = '47049009';
REVOKE ALL
on testgail
from public ;
Grant Select
on testgail
to public;