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
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
-- Thank you for being out here on a Sunday (or maybe it's Monday already where you are at).... thank you!! your quick answer was exactly what I needed. Norma Jean Message posted via http://www.dbmonster.comReceived on Sun Jul 10 2005 - 15:25:14 CDT
![]() |
![]() |