脚本功能:
1、将多个帐套物料的结算价格提取出来
应用场景:
1、分析物料每月波动情况
2、作为价格台账,采购报价时可以作为历史购买记录
3、使用EXCEL做成台账,分发给多部门使用,你将得到很好的评价
SQL截图
EXCEL台账应用截图
select
ufdata_008_2013.dbo.PurSettleVouchs.cInvCode as '存货编码 ' ,
ufdata_008_2013.dbo.PurSettleVouchs.dkeepdate as '记账日期' ,
ufdata_008_2013.dbo.PurSettleVouchs.iSVCost as '结算单价' ,
ufdata_008_2013.dbo.Inventory.cInvName AS '存货名称' ,
ufdata_008_2013.dbo.Inventory.cInvStd AS '规格型号'
from
ufdata_008_2013.dbo.PurSettleVouchs INNER JOIN ufdata_008_2013.dbo.Inventory ON
ufdata_008_2013.dbo.PurSettleVouchs.cInvCode=ufdata_008_2013.dbo.Inventory.cInvCode
union
select
ufdata_007_2013.dbo.PurSettleVouchs.cInvCode as '存货编码 ' ,
ufdata_007_2013.dbo.PurSettleVouchs.dkeepdate as '记账日期' ,
ufdata_007_2013.dbo.PurSettleVouchs.iSVCost as '结算单价' ,
ufdata_007_2013.dbo.Inventory.cInvName AS '存货名称' ,
ufdata_007_2013.dbo.Inventory.cInvStd AS '规格型号'
from
ufdata_007_2013.dbo.PurSettleVouchs INNER JOIN ufdata_007_2013.dbo.Inventory ON
ufdata_007_2013.dbo.PurSettleVouchs.cInvCode=ufdata_007_2013.dbo.Inventory.cInvCode
ORDER BY '存货编码 '
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。