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: Update table problem

Re: Update table problem

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Tue, 14 Apr 1998 00:16:07 -0700
Message-ID: <35330D37.D2C5F663@u.washington.edu>


The problem in in the first select clause referencing the bcc.bccuser bcc.
You probably need to write all of the conditions in the second select clause into the first clause to ensure that the bcc.address1 is not null.

Mike Krolewski

Anker Møller wrote:

> When I run the following update
>
> UPDATE xal_supervisor.debtable xal
> SET xal.address1 =
> (SELECT REPLACE(RTRIM(SUBSTR(bcc.address1, 0, 30)),'*',' ')
> FROM bcc.bccuser bcc
> WHERE bcc.public_id = xal.accountnumber)
> WHERE xal.accountnumber IN
> (SELECT bcc.public_id
> FROM bcc.bccuser bcc
> WHERE bcc.address1 IS NOT NULL AND
> bcc.address1 <> '' AND
> xal.address1 = '' AND
> bcc.public_id = xal.accountnumber);
>
> I get the error
>
> FROM bcc.bccuser bcc
> *
> ERROR at line 6:
> ORA-01407: cannot update mandatory (NOT NULL) column to NULL
>
> But why? - I only selects NOT NULL colums in my where clause
Received on Tue Apr 14 1998 - 02:16:07 CDT

Original text of this message

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