Oracle Merge/Insert
<p>I'm trying to see if there is an existing 'IMPORTID' in a table consisting of two columns: 'IMPORTID','STEP'. If there is, increment the record's STEP column by 1.</p>

<p>I've just tested using hardcoded values and there are no rows in the table currently. I'm expecting the following SQL to insert an entry but nothing is happening.</p>

<pre><code>MERGE into TOSTEP t
USING
    (SELECT 'Test' IMPORTID, 1 STEP FROM TOSTEP) s
ON
    (s.IMPORTID = t.IMPORTID)
WHEN MATCHED THEN
   update set t.STEP = s.STEP +1
WHEN NOT MATCHED THEN
    insert (IMPORTID,STEP)
    values ('Test',1);
</code></pre>