Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

bulk collect and cursors using rowtype

user1636556Nov 19 2010 — edited May 27 2011
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
This post has been answered by Sayan Malakshinov. on Nov 19 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2011
Added on Nov 19 2010
7 comments
3,063 views