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: Problem to access to the value of a collection

Re: Problem to access to the value of a collection

From: Christopher Beck <christopher.beck_at_oracle.com>
Date: Fri, 17 May 2002 08:20:23 -0400
Message-ID: <rC6F8.3$Rt.64@news.oracle.com>

Try:

  n_total := n_total + curr.COLUMN_VALUE;

hope this helps.

chris.

ps.

You need to change DBMS_OUT.PUT_LINE to DBMS_OUTPUT.PUT_LINE

--
Christopher Beck, Principal Technologist, Oracle Corporation,
christopher.beck_at_oracle.com
Beginning Oracle Programming,
http://www.amazon.com/exec/obidos/ASIN/186100690X


"slim" <sfar_selim_at_excite.com> wrote in message
news:491f65ba.0205170215.78a95805_at_posting.google.com...

> Hi,
>
> I have this type in the data base:
> create or replace type t_lkz as table of number
>
> and this is my test program
>
> DECLARE
> t t_lkz := t_lkz();
> n_total NUMBER(5) := 0;
> BEGIN
> t.extend(2);
> t(1) := 2;
> t(2) := 4;
>
> FOR cur IN ( (SELECT DISTINCT * FROM TABLE(cast(T AS T_LKZ)) ) ) LOOP
> -- The problem hier is that I do not how can I access to the
> -- value of the current row
> n_total := n_total + cur.???;
>
> END LOOP;
> dbms_out.put_line(n_total);
>
> END;
>
> thanks for help
Received on Fri May 17 2002 - 07:20:23 CDT

Original text of this message

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