79811309

Date: 2025-11-06 13:23:05
Score: 1.5
Natty:
Report link

The first INSERT statement will not work (does it even compile?).
It is a multi-row insert, so RETURNING INTO cannot be used in this way.

A better solution to achieve something like this, would be to use LOG ERRORS or BULK COLLECT with SAVE EXCEPTIONS.
You can find an example of both here:
https://asktom.oracle.com/ords/f?p=100:11:0::::P11_QUESTION_ID:1422998100346727312

Another thing: the DUP_VAL_ON_INDEX exception does not return a function result, nor does it (re)raise an exception.

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: theoa