--升级盘点记录历史数据计量单位
UPDATE t_fa_inventory_record A SET FUNITID = (select FUNITID FROM t_fa_card_real B WHERE A.FREALCARDID = B.FID)
WHERE (A.FUNITID is NULL OR A.FUNITID = 0) AND (select FUNITID FROM t_fa_card_real B WHERE A.FREALCARDID = B.FID) is not null;
