Hi Experts,
I have written a programme and just mention a user-defined error for error no -1403 but gettting compilation error.
However if I replace -1403 with 100 which is the error code for no_data_found it is working fine but the Oracle documentation describes differently.
is it the known behaviour.
I am using Oracle 12c R2
DECLARE
v_dname VARCHAR2(100);
e_invalid_dept EXCEPTION;
PRAGMA EXCEPTION_INIT(e_invalid_dept,-01403);
BEGIN
SELECT deptno INTO v_dname FROM EMP WHERE deptno=100;
EXCEPTION
WHEN e_invalid_dept THEN
DBMS_OUTPUT.PUT_LINE('There is a fatal error and the error code is '||SQLCODE||' and the error message is '||SQLERRM);
END;