Re: How to drop a temp table using "if exists" logic ?
Posted in 2006
You can attempt to drop the table in a stored procedure unconditionally and
ignore the specific error condition if it does not exist:
CREATE PROCEDURE drop_temp_table()
ON EXCEPTION IN (-206) END EXCEPTION;
DROP TABLE temp_table; END PROCEDURE;
You can't soft-code the table name without using a Datablade. See also the
newsgroup thread entitled "Creating generic routine to drop procedure" started
two days ago.
--
Regards,
Doug Lawry
www.douglawry.webhop.org
"Veeru71" <m_adavi@hotmail.com> wrote in message
news:1165378712.116761.199740@j72g2000cwa.googlegroups.com...
> Hi
> Is there a way to drop a temp table in Informix using some kind of "if
> exists" logic ?
> In oter words I need to test for the existence of the temp table
> before issuing "drop table" command.
> Thanks a lot.
> Murty