DECLARE
CURSOR c1
IS
SELECT *
FROM ota_activity_versions
WHERE business_group_id = 1107;
BEGIN
FOR i IN c1
LOOP
BEGIN
OTA_ACTIVITY_VERSION_API.
DELETE_ACTIVITY_VERSION (
p_activity_version_id => i.activity_version_id,
p_object_version_number => i.object_version_number,
p_validate => FALSE);
COMMIT;
DBMS_OUTPUT.put_line (i.activity_version_id || ' has been deleted ');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.
put_line (
'Inner Exception: '
|| SQLERRM
|| ' - '
|| i.activity_version_id);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;
No comments:
Post a Comment