I am trying to delete about a million rows from a table using a pl/sql block but am getting an error ORA-01002: fetch out of sequence
Here is the sample of the block
2 cursor selectfordelete is select * from test where region not in ('REGROLL','WWF','WWR','CON','
3 'CAN','LATAM','OWH','REGEAST','AFRME','ASPAC','EUR','OEH','OTH','NCI','WOUS','WOUSCON') for upd
5 for i in selectfordelete loop
6 delete from test where current of selectfordelete;
8 end loop;
ERROR at line 1:
ORA-01002: fetch out of sequence
ORA-06512: at line 5
Please suuggest something.
Click Here to Expand Forum to Full Width