Hi all,
Have u ever used multiple insert features of DB2 ?
DB2 V8 - Planning for Version 8 - Multiple-row INSERT and FETCH statements
I've tried to use it with indexed table but got error. I've noticed that multiple insert - an sample:
Code:
EXEC SQL
   INSERT INTO TABLENAME 
   (
     COL1, 
     COL2
   )
   VALUES 
   (
    :VAR-COL1, 
    :VAR-COL2
   )
   FOR :NUM-ROWS ROWS
END-EXEC.
works fine when table is declared:
Code:
05 VAR-COL1        OCCURS 5 TIMES PIC X(10)
05 VAR-COL2        OCCURS 5 TIMES PIC X(8)
but when is declared:
Code:
05 VAR            OCCURS 5 TIMES.
   10 VAR-COL1        PIC X(10).
   10 VAR-COL2        PIC X(8).
or
Code:
05 VAR            OCCURS 5 TIMES INDEXED BY IDX.
   10 VAR-COL1        PIC X(10).
   10 VAR-COL2        PIC X(8).
then it doesnt work. Maybe someone have more experience with this ?

--
Marcin Domaslawski