-- 物料采购信息 基本单位 字段数据升级
UPDATE T_BD_MATERIALPURINFO A SET FBASEUNITID = (SELECT FBASEUNIT FROM T_BD_MATERIAL B WHERE A.FMASTERID = B.FID) WHERE A.FBASEUNITID = 0 AND EXISTS (SELECT FBASEUNIT FROM T_BD_MATERIAL B WHERE A.FMASTERID = B.FID);



