title: Oracle: ON DUPLICATE KEY UPDATE
body: <p>I'm trying to implement a solution I found over <a href="https://stackoverflow.com/a/3466/2311708">here</a> from Michiel de Mare to update multiple records with one (preferably-simple-in-a-syntax-sense) query. The example code that I am trying to learn from looks like this:</p>
  
  <pre><code>INSERT INTO table (id,Col1,Col2) VALUES (1,1,1),(2,2,3),(3,9,3),(4,10,12) ON DUPLICATE KEY UPDATE Col1=VALUES(Col1),Col2=VALUES(Col2);
  </code></pre>
  
  <p>I'm using Oracle (and am not yet well versed in SQL queries).</p>
  
  <p>Based on some dynamic content, I have concatenated my query similar to the above. It can vary in length depending on how many records I am updating, but this is an example of a query that I generated:</p>
  
  <pre><code>INSERT INTO my_table (question_id,ug) VALUES (30,0),(31,1) ON DUPLICATE KEY UPDATE ug=VALUES(ug) 
  </code></pre>
  
  <p>The above query is getting this error:</p>
  
  <pre><code>Native message: ORA-00933: SQL command not properly ended
  </code></pre>
  
  <p>I am dealing with a content management system that has a function call that runs the queries; within this framework. I don't think it is pertinent, but I have never needed to put a ';' on the end of queries, however, I tried it with and without the semicolon.</p>