Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Jozsef Dojcsak — — source: Informix-list mailing list archive (1991-1998)
Thanks for the help.
> You could have WHENEVER SQLERROR statements spanning the DROP commands
> e.g
> WHENEVER SQLERROR CONTINUE
> DROP TABLE ...
> WHENEVER SQLERROR STOP -- the default
> CREATE TABLE ...
Unfortunately the WHENEVER can only be used in ESQL/C (and the ON EXCEPTION
can only used in SPL).And I rarely use ESQL/C program for schema definition
scripts. ;-)
Another suggestion I received :
>grep -v "DROP TABLE" ddl.sql > cr.sql # cr.sql now has only creates
>grep "DROP TABLE" ddl.sql > drop.sql
This seems to be a better solution. ( The only restriction that the drop
statements cannot span to more than one rows.)
And the last idea I had:
I created this elaborate function:
create procedure DropThis(sql lvarchar); define tmp int;
on exception in(-674)
end exception with resume
let tmp = bldExecSql(sql); -- this is a custom datablade function!!
end procedure;
It works but I don't like it...
Thanks,
Jozsef
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.