Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

DB2-L - Probleme mit GLOBAL TEMPORARY TABLE

Subject:

Re: Create Global Temp Tables

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

DB2 List <db2-l@lists.idug.org>

Date:

2002.11.05 13:17:00


If you're on DB2 V6 or V7, I would suggest you use DECLARE GLOBAL TEMPORARY
TABLE. For the INSERT you then could code INSERT INTO SESSION.DBSPACE ...;
I think it's the qualifier SESSION which prevents the BIND errors.

This should work IMO. I don't know for CREATE GLOBAL TEMPORARY TABLE; this
was introduced with DB2 V5 and is now obsolete, AFAIK.

Regards

Bernd


Am Die, 05 Nov 2002 schrieben Sie:
> I have a Cobol program where I'm using the following create statement
>
> EXEC SQL
> CREATE GLOBAL TEMPORARY TABLE DBSPACE
> (DBNAME CHAR(8) NOT NULL,
> DB_ENVR CHAR(1) NOT NULL,
> VERSION_NO DECIMAL(1) ,
> SPACE_TOTAL DECIMAL(18))
> END-EXEC
>
> I am inserting values into this table using the following SQL
>
> EXEC SQL
> INSERT INTO DBSPACE
> VALUES (:DATASET-NAME,:ENVIROMENT,:VERSION-NO,
> :SPACE-COMP)
> END-EXEC.
>
> The precompiler works but my bind gives me a -204 on the insert table name.
> Can someone help me with this?
>

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie