--todo 8315

update customer_link cl
   set cl.legacycustomernumber = (select c.legacycustomernumber
                                    from customer c
                                   where c.customer_id = cl.customer_id)
 where cl.customer_id in
       (select cc.customer_id
          from customer cc
         where nvl(cl.legacycustomernumber, 0) <>
               nvl(cc.legacycustomernumber, 0));