In our application, Global Temporary Table is used. It's j2ee/(jdbc)/db2 application.
At certain points following kind of query UPDATE "SESSION"."CBR_TEMPCASE8504" T SET CASESTATICSIMSCORE = coalesce(....)
throws following excetion
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0204N "SESSION.CBR_TEMPCASE8504" is an undefined name. SQLSTATE=42704
DECLARE statements are used to create the tables with ON COMMIT PRESERVE ROWS NOT LOGGED option, IN USER TEMPORARY TABLESPACE .
We have ensured that single connection will be used till the point queries to be fired on temporary table and upon completion connection is closed.
Any suggestion/enlightenment on other probable causes is welcome.