Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Question - Passing Arrays
On 11 Apr 2005 11:01:58 -0700, amerar_at_iwc.net wrote:
>.
> FOR i IN 1..p_batd.COUNT LOOP
> IF p_batd.trns_seg = 1 THEN
> v_seq_nbr := v_seq_nbr + 1;
> END IF;
>.
>.
>.
>
>When I try and compile I get the following error:
>
>28/7 PL/SQL: Statement ignored
>28/17 PLS-00302: component 'TRNS_SEG' must be declared
>32/7 PL/SQL: SQL Statement ignored
>
>What am I doing wrong? Any help would be appreciated.
p_batd is a pl/sql table. a pl/sql table is basically an array. Your
IF statement is not referring to any element of the array.
The syntax to refer to an element is
<table identifier>(<subscriptor variable>)[.record element]
-- Sybrand Bakker, Senior Oracle DBAReceived on Mon Apr 11 2005 - 14:19:03 CDT
![]() |
![]() |