Home > Ask the Oracle Database / Applications Experts > Questions & Answers > Capturing errors from MERGE statement
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Capturing errors from MERGE statement

Karen Morton EXPERT RESPONSE FROM: Karen Morton

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site
>
QUESTION POSED ON: 16 June 2003
Is there any way to capture errors from a MERGE statement? Also, is there any way to know how many records were inserted or updated for the MERGE statement like SQL%ROWCOUNT? Any assistance greatly appreciated.

>

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


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts