Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using Double Dimensional Arrays
> Am a newbie.How do I use a double dimensional array to do processing
like this:
set feedback off
create or replace type vc_array is table of varchar2(100);
/
create or replace type vc_array_array is table of vc_array; /
declare
array_of_array vc_array_array;
begin
array_of_array := vc_array_array();
array_of_array.extend;
array_of_array(1) := vc_array('one', 'two', 'three');
array_of_array.extend;
array_of_array(2) := vc_array('un', 'deux', 'trois');
array_of_array.extend;
array_of_array(3) := vc_array('eins', 'zwei', 'drei');
for i in 1 .. array_of_array.count loop
for j in 1 .. array_of_array(i).count loop
dbms_output.put(lpad(array_of_array(i)(j),6));
end loop;
dbms_output.put_line('');
end loop;
end;
/
drop type vc_array_array;
drop type vc_array;
hth
Rene Nyffenegger
-- Projektleitung und Entwicklung in Oracle/C++/C# Projekten http://www.adp-gmbh.ch/cv.htmlReceived on Fri Apr 25 2003 - 01:44:52 CDT
![]() |
![]() |