DECLARE
CURSOR get_details
IS
SELECT *
FROM per_jobs
WHERE business_group_id = <BUSINESS GROUP ID>;
BEGIN
FOR i IN get_details
LOOP
BEGIN
HR_JOB_API.
delete_job (p_validate => FALSE,
p_job_id => i.job_id,
p_object_version_number => i.object_version_number);
COMMIT;
DBMS_OUTPUT.put_line (i.job_id || ' has been Deleted !!!');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Inner Exception: ' || SQLERRM);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;
No comments:
Post a Comment