title: Error logging with MERGE query in Oracle 11
body: <p>I am using Oracle 11 and I have millions of records in my table. I am using a <code>MERGE</code> statement to update records from source table to target table.</p>
  
  <p>At any moment while updating these millions of records, how can I log errors per record?</p>
  
  <p>For example: I have successfully updated 400 records, but while updating 401st record, I am getting some error, so in this case how can I log something like</p>
  
  <blockquote>
    <p>401st record and its failure cause</p>
  </blockquote>
  
  <p>So that from these millions of records I can identify for which records the query has failed.</p>