
UPDATE T_BD_MATERIAL SET F_CYG_CHECKBOX = 0  

UPDATE A SET F_CYG_CHECKBOX = 1 FROM  T_BD_MATERIAL  A 
INNER JOIN T_CB_PROACNTENTRY B ON A.FMATERIALID = B.FPRODUCTID