码迷,mamicode.com
首页 > 其他好文 > 详细

【数据处理】各门店POS销售导入

时间:2014-09-11 20:56:12      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:os   数据   sp   c   r   ui   as   rom   select   

--抓取西部POS数据
DELETE FROM POSLSBF

INSERT INTO POSLSBF
select *
from [192.168.1.100].[SCMIS].DBO.possrlbf WHERE SLDAT>‘20130101‘
ORDER BY 1

INSERT INTO POSXBBF
SELECT * FROM POSLSBF WHERE UID NOT IN (SELECT UID FROM POSXBBF)
ORDER BY 1

delete from poslsdt

INSERT INTO POSLSDT
select b.uid,b.id,c.pluno,b.qty,b.amt,b.disamt,b.mmno,b.ismmx,b.isback,b.isdel
from [192.168.1.100].[SCMIS].DBO.possrlbf a,[192.168.1.100].[SCMIS].DBO.possrldt b,[192.168.1.100].[SCMIS].DBO.basplumain c
where a.uid=b.uid and b.pluid=c.pluid and a.sldat>‘20130101‘

INSERT INTO POSXBDT
SELECT * FROM POSLSDT WHERE UID NOT IN (SELECT UID FROM POSXBDT)
ORDER BY 1

--抓取东部POS数据
DELETE FROM POSLSBF

INSERT INTO POSLSBF
select *
from [192.168.2.102].[SCMIS].DBO.possrlbf WHERE SLDAT>‘20130101‘
ORDER BY 1

INSERT INTO POSDBBF
SELECT * FROM POSLSBF WHERE UID NOT IN (SELECT UID FROM POSDBBF)
ORDER BY 1

【数据处理】各门店POS销售导入

标签:os   数据   sp   c   r   ui   as   rom   select   

原文地址:http://www.cnblogs.com/nlg3413/p/3967173.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!