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: Merge statement? only want to update or insert merging field values if not nul

Re: Merge statement? only want to update or insert merging field values if not nul

From: <fitzjarrell_at_cox.net>
Date: 11 Jul 2005 05:26:30 -0700
Message-ID: <1121084790.248989.323730@g47g2000cwa.googlegroups.com>

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

>

> --
> 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.com

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

Original text of this message

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