Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Need MERGE without UPDATE clause

Re: Need MERGE without UPDATE clause

From: NormaJean S <forum_at_DBMonster.com>
Date: Thu, 07 Jul 2005 21:53:19 GMT
Message-ID: <50FB87BA9B150@DBMonster.com>


Mark C. Stock wrote:
>just update a column to itself, ie,
>merge into emp001
>using emp002 on (emp001.empno = emp002.empno)
>when matched then update set ename = emp001.ename
>when not matched then insert (empno) values(emp002.empno)
>
>however, depending on % of rows that are unnecessary updates, you might be
>better off doing an INSERT SELECT with an outer join in the subquery -- run
>some comparisons to determine what works best in your situation

Thanks Mark!
This instance is not on 10g yet as the other posting suggested. I followed your advice above, and it's working like a charm. Thanks for the help. Norma Jean

-- 
Message posted via http://www.dbmonster.com
Received on Thu Jul 07 2005 - 16:53:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US