update t_bd_materialmftinfo o set fminbatchunit = (select fbaseunit from t_bd_material m where m.fid = o.fmasterid) where fminbatchunit is null OR fminbatchunit = 0;

update t_bd_materialmftinfo o set fminbatchnum = 1 where fminbatchnum = 0;