| 
		
			| can I create cursors as arrey? [message #36312] | Thu, 15 November 2001 13:31  |  
			| 
				
				
					| Daniel Tsai Messages: 8
 Registered: November 2001
 | Junior Member |  |  |  
	| Dear, 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.
 
 Daniel
 ------------------------------------
 declare
 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)
 is
 cursor cr_bomms is
 select * from bomms
 where 1st_partno = v_2ndpart;
 cur(n) cr_bomms%rowtype;
 
 begin
 for cur(n) in cr_bomms loop
 if cur(n).sub_partfg = 'N' then
 f_part(i) = cur(n).2nd_partno;
 i := i + 1;
 else
 v_2ndpart := cur(n).2nd_partno;
 n := n + 1;
 compare_bom(v_2ndpart);
 end if
 end loop;
 end;
 
 ----------------------------------------------------------------------
 |  
	|  |  | 
	|  |