Hello,

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

M%20G's gravatar image

M G
629253044
accept rate: 42%


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.

permanent link

answered 17 Feb '15, 11:15

Elmi%20Eflov's gravatar image

Elmi Eflov
7811014
accept rate: 31%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×190
×35

question asked: 17 Feb '15, 06:58

question was seen: 360 times

last updated: 17 Feb '15, 11:15