Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Merge statement? only want to update or insert merging field values if not nul
NormaJean S via DBMonster.com wrote:
> fitzjarrell_at_cox.net wrote:
> >> Hi,
> >> I'm getting used to the merge statement. I really like it. I am using it in
> >[quoted text clipped - 22 lines]
> >> thanks,
> >> Norma Jean
> >
> > MERGE
> > INTO tab1
> > USING tab2 ON (lower(tab1.title) = lower(tab2.title) )
> > WHEN MATCHED THEN
> > UPDATE SET
> > tab1.code = nvl(tab2.code, tab1.code)
> > WHEN NOT MATCHED THEN
> > INSERT (id,code,title,description )
> > VALUES (....[std stuff]..... );
> >
> >David Fitzjarell
>
>
> >
You're very welcome, and it was Sunday when I posted that response. I sometimes peruse the newsgroup on the weekends. I also check my email on the weekends, as well (having a 24/7 position makes that a necessity) so should you wish to contact me offline you are more than welcome to do so.
David Fitzjarrell Received on Mon Jul 11 2005 - 07:26:30 CDT
![]() |
![]() |