Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Help
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
![]() |
![]() |