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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Using Double Dimensional Arrays

Re: Using Double Dimensional Arrays

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 25 Apr 2003 06:44:52 GMT
Message-ID: <b8alh4$80fab$1@ID-82536.news.dfncis.de>

> 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.html
Received on Fri Apr 25 2003 - 01:44:52 CDT

Original text of this message

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