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: bulk binding

Re: bulk binding

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Mon, 16 May 2005 20:48:57 +0200
Message-ID: <4288eaca$0$24053$626a14ce@news.free.fr>

"Eugene" <epipko_at_hotmail.com> a écrit dans le message de news:1116267407.089881.7500_at_z14g2000cwz.googlegroups.com...
| Hi all,
| I have the following code:
| =========================================================
| PROCEDURE upc_reuse_gen_upc_list_p (vArray_size IN PLS_INTEGER DEFAULT
| 100) IS
|
| TYPE sku_row IS TABLE OF sku%ROWTYPE;
| sku_rec sku_row;
|
| CURSOR upc_list IS
| select ...
| from upc a,
| sku b,
| where ......;
|
| BEGIN
| OPEN upc_list;
| LOOP
| FETCH upc_list BULK COLLECT INTO sku_rec LIMIT vArray_size;
|
| FORALL i IN 1..sku_rec.COUNT
| INSERT INTO upc_reuse_arch VALUES sku_rec(i);
|
| FORALL i IN 1..sku_rec.COUNT
| UPDATE upc
| SET upc_reuse_ind = '1',
| WHERE business_unit_id = sku_rec(i).business_unit_id
| AND upc_id = sku_rec(i).upc_id;
|
| EXIT WHEN upc_list%NOTFOUND;
|
| END LOOP;
| CLOSE upc_list;
|
| COMMIT;
| END upc_reuse_gen_upc_list_p;
| =========================================================
| Here is the question:
| Second FORALL fails with PLS-00436: implementation restriction: cannot
| reference fields of BULK In-BIND table of records.
| How can I make that update possible?
|
| Thanks,
| Eugene
|

You have to copy the two table fields in two other tables and use these two intermediate tables in the update statement. I'm afraid there is no other way.

Regards
Michel Cadot Received on Mon May 16 2005 - 13:48:57 CDT

Original text of this message

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