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

bulk binding

From: Eugene <epipko_at_hotmail.com>
Date: 16 May 2005 11:16:47 -0700
Message-ID: <1116267407.089881.7500@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 Received on Mon May 16 2005 - 13:16:47 CDT

Original text of this message

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