Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Probably simple sql question
Easy. There might be some rows in B that are NOT present in A (i.e. A and
B are the same ONLY with regard to table structure, the data could be
different, even only a little). If there is even one "extra" row/primary
key in B (compared with A), that row cannot get a value for the column
"offset" from your update query. The default value for this situation is
Null, but you have set the "offset" column to Not Null...
Robert XU
Doug Cowles (dcowles_at_bigfoot.com) wrote:
: I need to do a large update and can't quite figure it out. Essentially,
: I have two tables of the same name and fieldtypes in two different
: schemas.
: The only difference is that on one table, a field called "offset" has
: values in
: it and on the other table (table B), it doesn't. The idea is to get
: table b to
: look exactly like table a.
: I tried
: Update B set offset =
: (select offset from A where primarykey = B.primarykey)
: and got
: cannot update mandatory (NOT NULL) column to NULL.
: The offset is not null on both tables, so there are no null values. My
: correlation
: logic must be askew.
: Would appreciate any advice,
: - Dc.
Received on Tue May 25 1999 - 11:42:21 CDT
![]() |
![]() |