|
You capture errors the same way you would if you were doing regular INSERT and UPDATE statements....with exception handlers. Just include a WHEN OTHERS exception handler in the block where your MERGE statement is and have to display SQLCODE and SQLERRM if an error occurs. Then you can figure out which specific errors are occurring and create individual exception handlers for those.
As far as being able to tell counts for inserts and updates performed by MERGE, there is not currently a way to do that. I've seen the question posed several times before on Metalink and Oracle support as simply said:
You can create an enhancement request by going to
Metalink -> News & Events and go to ->
The Oracle Enhancement Request System!
For More Information
|