-- ABS-72826/ ABS-72842

update clientinvoicecategorycharge cicc
   set cicc.invoiceto = 0
 where cicc.invoiceto = 1
   and cicc.clientinvoicecategory_id in
       (select cic.clientinvoicecategory_id
          from clientinvoicecategory cic
         where cic.invoiceto = 0
           and cic.clientinvoicecategory_id = cicc.clientinvoicecategory_id);
commit;