In your scenario v_dup1 is a table, you need an index to handle it.
Try this...
Code:SQL> SQL> declare 2 type typ_dup1 is table of dup1%rowtype; 3 v_dup1 typ_dup1; 4 begin 5 select a bulk collect into v_dup1 from dup1; 6 for i in v_dup1.first .. v_dup1.last loop 7 dbms_output.put_line(v_dup1(i).a); 8 end loop; 9 end; 10 / PL/SQL procedure successfully completed. SQL>




Reply With Quote