DECLARE
CURSOR check_list
IS
SELECT * FROM per_checklist_items;
BEGIN
FOR i IN check_list
LOOP
BEGIN
per_checklist_items_api.
delete_checklist_items (
p_validate => FALSE,
p_checklist_item_id => i.checklist_item_id,
p_object_version_number => i.object_version_number);
COMMIT;
DBMS_OUTPUT.put_line (i.checklist_item_id || ' has been Purged !!!');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.
put_line ('Failure: ' || SQLERRM || '-' || i.checklist_item_id);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;
No comments:
Post a Comment