RE: Multiple Drop and Create View Statements
Posted in 2000
By default, dbaccess will continue executing SQL commands.
If you "export DBACCNOIGN=1" before invoking dbaccess,
processing will stop after the first error.
-----Original Message-----
From: Gail [mailto:wormang@sutterhealth.org]
Sent: Thursday, February 24, 2000 9:50 AM
To: informix-list@iiug.org
Subject: Multiple Drop and Create View Statements
Hello,
I'm new to writing Informix SQL and would appreciate any assistance you can
offer. My problem is,
I am writing a script, which will DROP and CREATE multiple views (see
example below). The DROP view does not always exist but I want to include
the DROP so that if it does exist I can keep everything clean. The problem
is if the DROP view doesn't exist the script stops with a file not found
which I realize. My understanding is that there is another command I can use
to keep the script processing even if a DROP view doesn't exist. I hope I'm
explaining this well enough for someone to assist me.
Thanks!
DROP VIEW vw_gapaccrcodemph;
CREATE VIEW vw_gapaccrcodemphAS SELECT *
FROM apaccrcode
WHERE apaccrcode.company in ('355', '360', '364', '366');
DROP VIEW vw_gapapprovalmph;
CREATE VIEW vw_gapapprovalmphAS SELECT *
FROM apapproval
WHERE apapproval.company in ('355', '360', '364', '366');
DROP VIEW vw_gapauditmph;
CREATE VIEW vw_gapauditmphAS SELECT *
FROM apaudit
WHERE apaudit.company in ('355', '360', '364', '366');