--todo 9298

update sortingdefinition sd
set sd.plant_id =  null
where sd.plant_id is not null
and sd.customer_id is not null;

commit;

-- Create/Recreate check constraints 
alter table SORTINGDEFINITION
  add constraint CHKSORTINGDEFINITION_NULL
  check (not (PLANT_ID is not null and CUSTOMER_ID is not null));
