DECLARE
CURSOR c1
IS
SELECT *
FROM ota_act_cat_inclusions
WHERE activity_version_id = 109115;
BEGIN
FOR i IN c1
LOOP
BEGIN
OTA_ACTIVITY_CATEGORY_API.
DELETE_ACT_CAT_INCLUSION (
p_activity_version_id => i.activity_version_id,
p_category_usage_id => i.category_usage_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