bulk collect and cursors using rowtype
Hi,
I am just trying a bulk collect from a table, and then display one of the values.
It keeps giving me the error:
dbms_output.put_line('f_viewed_rec: '||f_viewed_rec.job_id(i));
*
ERROR at line 66:
ORA-06550: line 66, column 53:
PLS-00302: component 'JOB_ID' must be declared.
----
cursor f_viewed IS
select job_id from jobs;
type f_viewed_type is table of f_viewed%rowtype;
f_viewed_rec f_viewed_type;
begin
open f_viewed;
LOOP
fetch f_viewed bulk collect into f_viewed_rec limit 5000;
--------
for i in f_viewed_rec.first .. f_viewed_rec.last
LOOP
dbms_output.put_line('f_viewed_rec: '||f_viewed_rec.job_id(i));
END LOOP;
END LOOP;
end;
/
--------------------------
Any ideas? Thanks very much for any help.
- Jenny