title: Creating two WHERE clauses in a MERGE UPDATE in Oracle 11
body: <p>I have two tables with same structure:
  masterTable (id, description, list_price) 
  and 
  changesTable (id, description, list_price)</p>
  
  <p>I want to merge changes from changesTable into masterTable, but I don't want to update 'description' in masterTable when it is NULL in changesTable, I want to keep old value</p>
  
  <p>I tried to do this</p>
  
  <pre><code>WHEN MATCHED THEN
  UPDATE SET master.list_price=changes.list_price,
  master.description=ch.description   
  WHERE length(changes.description)&gt;0
  </code></pre>
  
  <p>but in this case the list_price doesn't get updated as well.</p>
  
  <p>How can I merge them properly?
  Thanks</p>
  
  <blockquote>
    <p>here is the description of the problem: Use a single merge statement
    to update the upd_services table with the data in the table
    upd_services_changes_2. This merge will include updates, deletes and
    inserts. For this task, a delete is indicated by a negative price in
    the changes table. If the description field in the changes table is
    null then do not change the description in the services table when you
    do the update. Only do an insert if the list price is 0 or greater.</p>
  </blockquote>