|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: |
********************************************
create or replace procedure crpi_inv_purge as
v_count number ;
cursor c1 is select rowid from crpi.CRPI_INVENTORY_HIST
WHERE inventory_date < (to_date('06-30-2009','MM-DD-YYYY') - 60);
begin
v_count := 0;
for i in c1
loop
delete from crpi.CRPI_INVENTORY_HIST where rowid = i.rowid;
v_count := v_count+1;
if v_count=1000 then
commit;
v_count := 0;
end if;
end loop;
commit;
exception
when others then
dbms_output.put_line ( 'Exception in deleting rows :'||sqlerrm);
end;
/
********************************************
|
Advertisement
| Hall of Fame |
There are currently no qualifying experts in Oracle 8.x
There are currently no qualifying experts in Oracle 8.x