Home » SQL & PL/SQL » SQL & PL/SQL » can I create cursors as arrey?
can I create cursors as arrey? [message #36312] Thu, 15 November 2001 13:31 Go to next message
Daniel Tsai
Messages: 8
Registered: November 2001
Junior Member
I am trying to declare cursors as arrey because I am not sure how many cursors I have to create and all of them are almost the same. can a procedure call itself in it's body? The following is the code, please give me some suggestions. Thanks a lot.

type part_rec is table of varchar2(100) index by binary_integer;
f_part part_rec;
v_2ndpart bomms.2nd_partno%type;
i integer :=1;
n integer :=1;
procedure compare_bom(v_2ndpart)
cursor cr_bomms is
select * from bomms
where 1st_partno = v_2ndpart;
cur(n) cr_bomms%rowtype;

for cur(n) in cr_bomms loop
if cur(n).sub_partfg = 'N' then
f_part(i) = cur(n).2nd_partno;
i := i + 1;
v_2ndpart := cur(n).2nd_partno;
n := n + 1;
end if
end loop;

Re: can I create cursors as arrey? [message #36328 is a reply to message #36312] Fri, 16 November 2001 08:36 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Have you taken a llok at the "connect by statement". It looks like you are querying a hierarchy.
Also too this link:

Previous Topic: possibility to list files in a directory ?
Next Topic: size of long column?
Goto Forum:

Current Time: Sun May 31 02:51:57 CDT 2020