DECLARE
CURSOR get_details
IS
SELECT * FROM hr_locations;
BEGIN
FOR fetch_details IN get_details
LOOP
hr_location_api.
delete_location (
p_validate => FALSE,
p_location_id => fetch_details.location_id,
p_object_version_number => fetch_details.object_version_number);
COMMIT;
DBMS_OUTPUT.put_line ('Location Purged: ' || fetch_details.location_id);
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;
No comments:
Post a Comment