'commit' in execute immediate...
Hi folks
I am writing a proc which removes a lot of data from different tables.
I am parsing a string into variable like:
declare v_i1 pls_int:=1;
begin
while v_i1 > 0 loop
delete table 1 where .... and rownum<30000;
v_i1:=sql@rowcount;
commit;
end loop;
end;
It's coded for every table and executed. However, execution complains about 'commit' statement. Do I violate a usage of exeucte immediate by including commit in it?
Straight delete statement were causing error message from undo segment being unable to expand. So I try to delete data in a smaller batches.
Are there any alternatives for what i am trying to accomplish?