Re: drop table/procedure/...
Posted in 1997
You could have WHENEVER SQLERROR statements spanning the DROP commands
e.g
WHENEVER SQLERROR CONTINUE
DROP TABLE ...
WHENEVER SQLERROR STOP -- the default
CREATE TABLE ...
On Thu, 06 Nov 1997 17:58:05 +0100, Jozsef Dojcsak
<jozsef@highway.bertelsmann.de> wrote:
>I generally use text files for SQL DDL definitions which contain both
>the create and the drop statements.
>Is there a way in Informix SQL dialect avoid the error messages like the
>following ?
> 674: Routine (...) can not be resolved.>
> 111: ISAM error: no record found.>
>In this case the drop statement failed. I know that the routine does not
>exist but separating (commenting out) the drops is inconvenient. For
>instance in Transact SQL I am allowed to use something like "if
>exists(select id from sysobjects where name='my_object') then drop
>my_object".
>
>Thanks,
>Jozsef
>
Rudy Fernandes
Purolator Courier, Canada
Off : rfernand@purolator.com
Res : rferdy@pathway.com