If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 load + global temp table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-04, 14:51
saltbits saltbits is offline
Registered User
 
Join Date: Jun 2004
Posts: 28
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.
Reply With Quote
  #2 (permalink)  
Old 07-05-04, 09:29
J Petruk J Petruk is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 07-06-04, 13:35
saltbits saltbits is offline
Registered User
 
Join Date: Jun 2004
Posts: 28
Thanks, JP.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On