KenCunningham
Technical User
Hi folks. I'm probably being particularly dumb this morning, but I'm having problems updating a column using a select from another table. The sql I'm using is:
but this comes back at me with:
I may be missing something obvious here (there are no nulls in the source table!), but can't for the life of me see it. Any advice on what is wrong here, or alternative approaches, would be welcome. TIA.
Code:
update property p
set p.management_area_code = (select n.new_ref
from new_allocs n
where p.management_area_code = n.old_ref
and p.property_class = '1')
/
but this comes back at me with:
Code:
update property p
*
ERROR at line 1:
ORA-01407: cannot update ("BULL"."PROPERTY"."MANAGEMENT_AREA_CODE") to NULL
I may be missing something obvious here (there are no nulls in the source table!), but can't for the life of me see it. Any advice on what is wrong here, or alternative approaches, would be welcome. TIA.