I have an insert inside a try block and when I try to set a NOT NULL Column to NULL I end up in the catch but
SELECT SQLCODE, ERRORMSG() INTO v_sqlcode, v_errormsg
end up with
v_sqlcode= 0 v_errormsg = NULL
Is this a correct behaviour or should it work?
asked 17 Feb '15, 06:58
Is the SELECT statement the first statement executed in the error handler?
Try using ERROR_SQLCODE and ERROR_MESSAGE builtin functions - those should report the error information anywhere in the handler, not just in the first statement.
answered 17 Feb '15, 11:15