Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem to access to the value of a collection
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...Received on Fri May 17 2002 - 07:20:23 CDT
> 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
![]() |
![]() |