It is possible to split insert statment & update stament from merge query using java
<p>I have a merge query like this</p>

<pre><code>MERGE INTO dept a
 USING (
     SELECT  50           deptno
          , 'ENGINEERING' dname
          , 'WEXFORD'     loc
     FROM dual
 ) b
 ON (a.deptno = b.deptno)
 WHEN NOT MATCHED THEN
     INSERT VALUES (b.deptno, b.dname, b.loc)
 WHEN MATCHED THEN
     UPDATE SET a.loc = 'WEXFORD, PA';
</code></pre>

<p>I need output  like:</p>

<pre><code>INSERT VALUES (b.deptno,b.dname,b.loc)
UPDATE SET a.loc='WEXFORD,pA'
</code></pre>

<p>Can I achieve this by using substring any another simple way to do this.</p>
