DECLARE
s CLOB;
BEGIN
s := TO_CLOB('
DECLARE
PROCEDURE PC(i NUMBER, d1 NUMBER, d2 NUMBER) IS
BEGIN
IF i <= 0 OR i != d1 OR i != d2 THEN
RAISE_APPLICATION_ERROR(-20100, ''ERROR:'' || i || '' != '' || d1 || '' / '' || d2);
END IF;
END PC;
BEGIN
');
FOR i IN 34000 .. 45000 LOOP
DBMS_LOB.APPEND(s, 'PC(' || i || ',' || i || ',' || i || ');
');
END LOOP;
DBMS_LOB.APPEND(s, '
END;');
EXECUTE IMMEDIATE s;
END;
ORA-20100: ERROR:44922 != 0 / 34000 ORA-06512: at line 6 ORA-06512: at line 10932 ORA-06512: at line 21 ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-20100