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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Help

Re: SQL Help

From: Glenn Baron <gbaron_at_dial.pipex.com>
Date: 7 May 1999 16:36:44 GMT
Message-ID: <01be98a8$0f2715e0$cb6d45c2@default>


change the subquery to read

"select nvl(b.col_2,a.col_1) from ..... "

cheers

Glenn Baron

Paul Davies <cobalt_at_dircon.co.uk> wrote in article <37331399_at_newsread3.dircon.co.uk>...
> I'm running Oracle 8
>
> I've got an update query:
>
> update TABLE_A a
> set a.COL_1 = (select COL_2 from TABLE_B b where a.COL_3 = b.COL_3);
>
> If the subquery returns NULL, I want to leave a.COL_1 unchanged i.e. not
set
> it to null. How do I do this?
>
>
>
>
>
>
>
Received on Fri May 07 1999 - 11:36:44 CDT

Original text of this message

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