cannot update null in not null field....but there is no null value coming
875608Aug 18 2011 — edited Aug 19 2011Hi everyone,
I really need some help here.
I had been trying this simple query for almost 4-5 hours now but no cluse what;s happening.
the query is
update temp_prime_vdart t set distrb_nbr=
(select min(distrb_nbr) from sm_ent_mfr_pos_dlta_actl a where a.purch_unit_nbr=t.purch_unit_nbr);
it says cannot update NULL to distrb_nbr.
But the table I am taking the data from has distributor number as a part of primary key so it will never be null.
And I have given a condition that a.purch_unit_nbr=t.purch_unit_nbr, so if it does not match nothing will be updated.
But i felt that it is creating some problem if the same purch_unit_nbr is not in the inner table.
Also the strage thing is if the purch_unit-nbr is available still it says cannot update NULL to distrb_nbr.
I tried all the options.
Maybe correlated update runs in a different way....and i understood it wrong.
Can you pelase help.