Hi all,
Iam getting some stacked value in SQLERRM, please find the code and its output. I am expecting only the latest error message, How to avoid this stacking behaviour of the error message.
All replies will be appreciated.
Program:
DECLARE
LV_1 NUMBER;
BEGIN
RAISE NO_DATA_FOUND;
EXCEPTION
WHEN OTHERS THEN
BEGIN
RAISE TOO_MANY_ROWS;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line(SQLERRM);
END;
END;
Output:
ORA-01422: exact fetch returns more than requested number of rows
ORA-01403: no data found
Expected Output: ORA-01422: exact fetch returns more than requested number of rows