Temp table - does the temp table already exist?
Posted in 2010
Topics: Stored Procedures & SPL, Jobs, Consulting & Announcements
Informix IDS 11.5 on Linux. We create temp tables using stored procedures(SPL) which are sometimes used by other stored procedures/functionality. The stored procedure can be executed more than once in a session, which means that an error occurs (temp table already exists) when the create statement is executed. To manage this, we use an exception statement 'WITH RESUME' to drop and create the table if the temp table already exists. Is there any other way of determining wether a temp table with the same name already exists in a session?
What you are doing now is 'best practice'. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) See you at the 2010 IIUG Informix Conference April 25-28, 2010 Overland Park (Kansas City), KS www.iiug.org/conf Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Mar 15, 2010 at 7:08 AM, MARGARET BESTER < margaret.bester@tollink.co.za> wrote: > Informix IDS 11.5 on Linux. > We create temp tables using stored procedures(SPL) which are sometimes used > by > other stored procedures/functionality. The stored procedure can be executed > more than once in a session, which means that an error occurs (temp table > already exists) when the create statement is executed. To manage this, we > use > an exception statement 'WITH RESUME' to drop and create the table if the > temp > table already exists. > Is there any other way of determining wether a temp table with the same > name > already exists in a session? > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001517479238fe214b0481d8b0a2