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!

Problem with error 06502 and cursor

908996Jan 4 2012 — edited May 16 2013
Hello.

I have a problem with my code. I'll put an example:

PROCEDURE Example() IS
cursor example_cursor is select example_field1, example_field2,... from example_table;
example_var example_cursor%rowtype;
BEGIN
for example_var in example_cursor loop
dbms_output.put_line(example_var.example_field1);
end loop;
END;

When I call the procedure from an anonimous block, the procedure execution fails giving me the ora-06502 Bulk Bind Truncated Bind error in the "for example_var in example_cursor loop" line.

But, when I execute only the code in an anonimous block with declare cursor... begin for... end; it works.

I don't know what can I do, or what must I searf for, to fix this problem.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2013
Added on Jan 4 2012
13 comments
3,861 views