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