Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: need code for Bulk inserts

Re: need code for Bulk inserts

From: noone <noone_at_nowhere.com>
Date: Tue, 07 Mar 2006 01:37:33 GMT
Message-ID: <xt5Pf.45213$H71.26032@newssvr13.news.prodigy.com>


paulhux174_at_hotmail.com wrote:
> Hi,
> This code is far too slow. Can some show me some code to speed it up.
> Many thanks.
>
> -- PL SQL CODE
> --------------------------------------------------------------------------------
> OPEN val_cur;
> -- about 100,000 records
> LOOP
> FETCH val_cur
> INTO c1rec;
>
> EXIT WHEN val_cur%NOTFOUND ;
> parent_parent_zuidbook := getparent (p_uid =>
> c1rec.uidvalue); -- function call gets an ID number.
>
> IF parent_zuidchh IS NOT NULL
> THEN
> UPDATE zbook a
> SET a.zuidparent = c1rec.zuidbook
> WHERE a.zuidbook = parent_zuidbook;
> UPDATE zbook a
> SET a.ztype = 'U'
> WHERE a.zuidbook = c1rec.zuidbook;
> ELSE
> UPDATE zbook a
> SET a.ztype = 'I'
> WHERE a.zuidbook = c1rec.zuidbook;
> END IF;
> END LOOP;
> CLOSE val_cur;
>
> --------------------------------------------------------------------------------
>

what is the definition of val_cur cursor? what is the defintion of getparent?

Can you use a trigger to get the next ID and use SQL*loader to load the data? Received on Mon Mar 06 2006 - 19:37:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US