Select...For Update (ORA-03001: unimplemented feature ERROR)
655128Apr 8 2009 — edited Apr 9 2009Can anyone point out why i get the unimplemented feature error while trying to execute the below sql...??
set serveroutput on
/* create table with some data */
drop table foo;
create table foo (id number);
insert into foo values (5);
insert into foo values (6);
insert into foo values (7);
insert into foo values (100);
commit;
declare
tempusage number := 1;
type cur is ref cursor;
stickyCur cur;
lstmt1 varchar2(4000);
lstmt0 varchar2(4000);
begin
lstmt1 := 'select id from foo where '||
' id > 5 for update';
open stickyCur for lstmt1;-- using num_list;
loop
begin
fetch stickyCur into tempusage;
dbms_output.put_line(tempusage);
exit when stickyCur%NOTFOUND;
lstmt0 := 'update foo set id = 12 ' ||
' where current of stickyCur ';
execute immediate lstmt0;
end;
end loop;
close stickyCur;
commit;
end;
/