首页 > 代码库 > 【数据处理】各门店POS销售导入
【数据处理】各门店POS销售导入
--抓取西部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销售导入