dbTalk Databases Forums  

load from a cursor

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss load from a cursor in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Toralf Kirsten
 
Posts: n/a

Default load from a cursor - 08-26-2003 , 01:23 PM






Hi,
I used DB2's bulk loader "load" to import large amount of data into a
temporary table. From there I want to move the data into another table
using joins etc.
In order to move this data from the temporary table to the production
table, I read in the IBM RedBoob Series "Moving Data Across the Db2
family" (p.18) there are commands like the following two which can be
used to perform a high performance (!!!) insert

DECLARE mycurs CURSOR FOR select ...
LOAD FROM mycurs OF CURSOR insert into (...)

While the first command works fine, the second return an error: SQL0104N
after the <> follows the unexpected token INTO. To the possible tokens
belongs "("

Does anybody know what's wrong?
Thanks in advance, Tori


Reply With Quote
  #2  
Old   
Toralf Kirsten
 
Posts: n/a

Default Re: load from a cursor - 08-27-2003 , 02:51 AM






Great Sorry,
it works fine. Something in my statement was wrong
see you, Tori

Toralf Kirsten wrote:

Quote:
Hi,
I used DB2's bulk loader "load" to import large amount of data into a
temporary table. From there I want to move the data into another table
using joins etc.
In order to move this data from the temporary table to the production
table, I read in the IBM RedBoob Series "Moving Data Across the Db2
family" (p.18) there are commands like the following two which can be
used to perform a high performance (!!!) insert

DECLARE mycurs CURSOR FOR select ...
LOAD FROM mycurs OF CURSOR insert into (...)

While the first command works fine, the second return an error: SQL0104N
after the <> follows the unexpected token INTO. To the possible tokens
belongs "("

Does anybody know what's wrong?
Thanks in advance, Tori



Reply With Quote
  #3  
Old   
Joachim Klassen
 
Posts: n/a

Default Re: load from a cursor - 08-27-2003 , 05:42 AM



What Version of DB2 do you use ?
LOAD from CURSOR is available in DB2 V8, not in V7.2 or earlier


Toralf Kirsten <tkirsten (AT) izbi (DOT) uni-leipzig.de> wrote

Quote:
Hi,
I used DB2's bulk loader "load" to import large amount of data into a
temporary table. From there I want to move the data into another table
using joins etc.
In order to move this data from the temporary table to the production
table, I read in the IBM RedBoob Series "Moving Data Across the Db2
family" (p.18) there are commands like the following two which can be
used to perform a high performance (!!!) insert

DECLARE mycurs CURSOR FOR select ...
LOAD FROM mycurs OF CURSOR insert into (...)

While the first command works fine, the second return an error: SQL0104N
after the <> follows the unexpected token INTO. To the possible tokens
belongs "("

Does anybody know what's wrong?
Thanks in advance, Tori

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.