Re: Multi-dimensional Array

From: Jeff Smith <jsmit234_at_ford.com>
Date: Tue, 18 Mar 2003 08:17:47 -0500
Message-ID: <b5769r$76n5_at_eccws12.dearborn.ford.com>


Huh?

SQL> declare

  2     type score_type  is table of jeff%ROWTYPE index by binary_integer;
  3     my_score    score_type;
  4  begin
  5     for a in 1 .. 10 loop
  6
  7        my_score(a).SOA_RQMT_NUMBER := TO_CHAR( a );
  8        my_score(a).SOA_REQ_01_STITLE := TO_CHAR( a );
  9
 10     end loop;
 11
 12     FOR X IN 1..10 LOOP
 13       DBMS_OUTPUT.PUT_LINE( my_score(X).SOA_RQMT_NUMBER );
 14       DBMS_OUTPUT.PUT_LINE( my_score(X).SOA_REQ_01_STITLE );
 15
 16     END LOOP;

 17
 18
 19 end;
 20 /
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10

PL/SQL procedure successfully completed.

"M" <someone_at_microsoft.com> wrote in message news:b56q4i$10gg$1_at_news.hgc.com.hk...
> pl/sql table is only single-dimension. for example,
>
> declare
> type score_type is table of number(3) index by binary_integer;
> my_score score_type;
> begin
> for a in 1 .. 100 loop
> my_score(a) := a;
> end loop;
> end;
>
> Then I can assign values to my_score(a), a single-dimension array. Just
> want to know if there is something like, e.g. 2-dimensional arrays like
> my_score(a, b) ... or even multi-dimensional.
>
> M.
>
> "Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.com> wrote in message
> news:U1lda.141918$S_4.82850_at_rwcrnsc53...
> > How about using pl/sql tables?
> > Jim
> > "M" <someone_at_microsoft.com> wrote in message
> > news:b53ej3$2144$1_at_news.hgc.com.hk...
> > > Hi all,
> > >
> > > Just want to know in Oracle 8i, can I define some multi-dimensional
> array
> > to
> > > store data for analysis purpose. Can this kind of array be define on
> the
> > > fly, instead of some objects in the database?
> > >
> > > Thx.
> > > M.
> > >
> > >
> >
> >
> >
>
>
Received on Tue Mar 18 2003 - 14:17:47 CET

Original text of this message