Re: Q: Ignoring Errors in DBACCESS
Posted in 1998
ccremid — — source: Informix-list mailing list archive (1991-1998)
Fred Prose wrote:
>
> Is there a way to tell DBACCESS or ISQL to ignore errors in an SQL script
> file? For example, don't stop if a DROP TABLE statement executes and the
> table doesn't exist.
If you execute the sql script from the command line dbaccess will
ignore the errors. Ex, if you have a file test.sql with
----------------------
database stores7;
drop table t1;
create table t1 (
col1 char(1)
);-------------------
Running:
dbaccess - test
Will create the table even if t1 does not exist. You can
redirect stdout and stderr if you do not want to see the
errors reported. The only gotcha is that the return code of
dbaccess will be different than zero if *any* sql statement
had an error.
HTH
Tino