Re: Ignoring errors in ISQL
Posted in 1994
SFidai (sfidai@aol.com) wrote:
: Hi,
: In 4GL, you have WHENEVER ERROR .. statement, do we have any equivalent
: statement in ISQL? I really need that functionality. We use common
: database upgrade script to be delivered with new software release. Some
: customer may receive interim release where they may already got some of
: the database changes performed by upgrade. Say for example, you need to
: create an index. If that index is already present, CREATE INDEX statement
: fail and whole sql script will fail also. I found a workaround.
: !echo "create index...." | isql dbname > /dev/null 2>&1
: if index is aready present, it will not affect the whole script
: Does anyone have a better idea?
If you have Informix 5.x, use dbaccess in place of isql. One of the
differences between the two is that dbaccess always continues after
an error.
-Jeff