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: update with multi table join

Re: update with multi table join

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 06 Nov 2003 14:00:56 -0800
Message-ID: <1068156076.257687@yasure>


Ken Chesak wrote:

>When the subquery finds nothing the id_bjn is updated with null. How
>can I avoid updating records when there is no match is found in the
>subquery?
>
>update w_rg101 w
>set id_bjn = ( select c.id_destination from bjn a, bjn_destination c
> where w.id_region_tw = a.id_region
> and w.id_unit_tw = a.id_unit
> and w.id_mail_tw = a.id_mail)
>where cd_source <> 'ITSI' and id_bjn is null;
>
>

And the following:

WHERE <column_name> IS NOT NULL;

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Nov 06 2003 - 16:00:56 CST

Original text of this message

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