From: "NormaJean S" <forum@DBMonster.com>
Subject: Re: Need MERGE without UPDATE clause
Newsgroups: comp.databases.oracle.server
Date: Thu, 07 Jul 2005 21:53:19 GMT
References: <50F02DE291C40@DBMonster.com> <ts6dnWw1vNFGC1HfRVn-sg@comcast.com>
Organization: http://www.DBMonster.com
Message-ID: <50FB87BA9B150@DBMonster.com>
X-Abuse-Report: http://www.DBMonster.com/Uwe/NB/Abuse.aspx
NNTP-Posting-Host: 216.32.72.34
X-Trace: advenet.com 1120773199 216.32.72.34 (7 Jul 2005 17:53:19 -0400)
Lines: 19
Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!news.belwue.de!LF.net!news.jgaa.com!advenet.com!not-for-mail
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:246811

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
