Not sure what I am doing wrong, this works in 6.7, but if you run the following:
declare
cursor dale_curs is
select 1 my_val from dual
union
select 2 my_val from dual
union
select 3 my_val from dual
union
select 4 my_val from dual
union
select 5 my_val from dual;
begin
for x in dale_curs loop
dbms_output.put_line('VAL: ’ || x.my_val);
end loop;
end;
/
My output is:
**** SCRIPT STARTED Session: APPS@ITLCDEV(1) 10/22/2013 07:33:55 ****
declare
cursor dale_curs is
select 1 my_val from dual
union
select 2 my_val from dual
union
select 3 my_val from dual
union
select 4 my_val from dual
union
select 5 my_val from dual;
begin
for x in dale_curs loop
dbms_output.put_line('VAL: ’ || x.my_val);
end loop;
end;
==>
PL/SQL block executed
VAL: 1
**** SCRIPT ENDED 10/22/2013 07:33:55 ****
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems to stop after the first time. I have spent a bunch of time trying to figure out why one of my cursors was not working and finally tried it in 6.7 and it worked fine.
Has some setting changed that I need to update?