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

Home -> Community -> Mailing Lists -> Oracle-L -> [oracle-l] pl/sql array processing?

[oracle-l] pl/sql array processing?

From: Guang Mei <gmei_at_incyte.com>
Date: Mon, 26 Jan 2004 15:41:03 -0500
Message-ID: <NJEDKDKJDGAKAEKKNEEJOEHLCMAA.gmei@incyte.com>


Hi,

I have the folliwng pl/sql code for oracle 8173. I am wondering if there is a way to make it faster by not looping each array elements, but doing some kind of "forall" opration to my_package.function?

declare
  type numTbl is table of number index by binary_integer;

  refTbl		numTbl;
  i             number;
  str           varchar2(30);

begin
  refTbl (1) := 1;
  refTbl (9) := 1;
  refTbl(15) := 1;
  refTbl(99) := 1;

  i := refTbl.first;
  while i is not null loop
    dbms_output.put_line ('i=' || i);
    str:= my_package.function(i);
    i := refTbl.next(i);
  end loop;
end;
/

TIA. Guang Received on Mon Jan 26 2004 - 14:41:03 CST

Original text of this message

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