Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: need code for Bulk inserts
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
![]() |
![]() |