Consultor Eletrônico



Kbase 40527: How to programmatically perform a Bulk Insert with Oracle DataServer
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Solution ID: P10527

GOAL:

How to programmatically perform a Bulk Insert with Oracle DataServer

FACT(s) (Environment):

Oracle DataServer

FIX:

def var h1 as int no-undo.

run stored-proc send-sql-statement h1 = proc-handle ("--Bulk-insert
Start").
close stored-proc send-sql-statement where proc-handle = h1.

/* Where statement is optional */
FOR EACH <progress_Table> NO-LOCK /* WHERE ... */:

CREATE <Oracle_table>.

/* ASSIGN statement is optional unless all records needs to be transferred from the progress table. */
ASSIGN <oracle_table>.<field> = <Progress_table>.<field>.

END.
RELEASE <Oracle_table>. /* Flush out the last one before --Bulk-insert
End */

run stored-proc send-sql-statement h1 = proc-handle ("--Bulk-insert
End").
close stored-proc send-sql-statement where proc-handle = h1.