-- 先删除不更新库存维度(后台)所有数据
delete from t_bd_manustrategy_no_inv;

insert into t_bd_manustrategy_no_inv(fpkid,fid,fbasedataid)
(select (fmsid + fdimid) as fpkid, fmsid as fid,fdimid as fbasedataid from (select A.fid fmsid, B.fid fdimid from t_bd_manustrategy as A, t_bd_manustrategydim as B where B.FINVENTORYDIM = 'A') as C where (select count(1) as num from t_bd_manustrategy_inv as D where D.fbasedataid = C.fdimid and D.fid = C.fmsid) = 0 group by fmsid,fdimid);

