Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    28

    Unanswered: db2 load + global temp table

    Can someone please help find what is wrong with this code:

    DECLARE GLOBAL TEMPORARY TABLE GLOB1(ID BIGINT) WITH REPLACE;
    LOAD FROM "C:\loadtab.txt" OF DEL MESSAGES "C:\loadtabmsg.txt" INSERT INTO SESSION.GLOB1;

    I get the following error on the LOAD statement even though the declare statement was successful:
    SQL3304N The table does not exist.

    If I replace the session.glob1 with name of some table from the db, it works fine. There is only one column of data in the txt file and the data types are fine.

    Thanks for any help.

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by saltbits
    Can someone please help find what is wrong with this code:

    DECLARE GLOBAL TEMPORARY TABLE GLOB1(ID BIGINT) WITH REPLACE;
    LOAD FROM "C:\loadtab.txt" OF DEL MESSAGES "C:\loadtabmsg.txt" INSERT INTO SESSION.GLOB1;

    I get the following error on the LOAD statement even though the declare statement was successful:
    SQL3304N The table does not exist.

    If I replace the session.glob1 with name of some table from the db, it works fine. There is only one column of data in the txt file and the data types are fine.

    Thanks for any help.
    You can't use LOAD with temporary tables.
    --
    Jonathan Petruk
    DB2 Database Consultant

  3. #3
    Join Date
    Jun 2004
    Posts
    28
    Thanks, JP.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •