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

【瑞星系统】转移商品资料

时间:2014-07-27 22:35:50      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:color   size   ui   dp   rom   a   ad   date   

INSERT INTO   AABASPLUMAIN
SELECT PLUID,DPTID, PLUNO, PLUNAME, SPEC, PKUNIT, PKQTY, STKIT, SENDKIND
FROM [192.168.1.100].[scmis].[dbo].BASPLUMAIN


select * INTO  AABASPLUEXT
FROM (SELECT PLUID, COLOR, [SIZE], VALIDDAY, PROD, EXTNO, GSPEC, BFNAME, RSV, MAXQTY, MINQTY, SAFQTY
      FROM [192.168.1.100].[scmis].[dbo].BASPLUEXT) A

SELECT * into AABASPLUPRC
FROM (SELECT PLUID, NOTX, ADDTX, SALTX, EXCTX, SLPRC, PRCRAT, PROP, SI, VALID, VIPRAT, MAXSALQTY, OPNPRC, ZSLPRC, MSLPRC, PRICEOPT, MAXPRICE, MINPRICE, AVGCSPRC
      FROM [192.168.1.100].[scmis].[dbo].BASPLUPRC) A

SELECT * INTO AABASPLUDSC
FROM (SELECT PLUID, UPDATETIME, FLAG, XPBZ, STAT, BB, FILT
      FROM [192.168.1.100].[scmis].[dbo].BASPLUDSC ) A

SELECT * INTO AABASPLUBCD
FROM (SELECT PLUID, BCD, ANAME, CLASS, PROD
      FROM  [192.168.1.100].[scmis].[dbo].BASPLUBCD) A

DELETE FROM AABASPLUMAIN

insert into BASPLUMAIN(DPTID, PLUNO, PLUNAME, SPEC, PKUNIT, PKQTY, STKIT, SENDKIND)
SELECT * FROM AABASPLUMAIN

insert into BASPLUEXT(PLUID, COLOR, [SIZE], VALIDDAY, PROD, EXTNO, GSPEC, BFNAME, RSV, MAXQTY, MINQTY, SAFQTY)
SELECT C.PLUID,A.COLOR, A.[SIZE], A.VALIDDAY, A.PROD, A.EXTNO, A.GSPEC, A.BFNAME, A.RSV, A.MAXQTY, A.MINQTY, A.SAFQTY
FROM AABASPLUEXT A
LEFT JOIN AABASPLUMAIN B ON A.PLUID=B.PLUID
LEFT JOIN BASPLUMAIN  C ON B.PLUNO=C.PLUNO

insert into BASPLUPRC(PLUID, NOTX, ADDTX, SALTX, EXCTX, SLPRC, PRCRAT, PROP, SI, VALID, VIPRAT, MAXSALQTY, OPNPRC, ZSLPRC, MSLPRC, PRICEOPT, MAXPRICE, MINPRICE, AVGCSPRC)
SELECT C.PLUID, A.NOTX, A.ADDTX, A.SALTX, A.EXCTX, A.SLPRC, A.PRCRAT, A.PROP, A.SI, A.VALID, A.VIPRAT, A.MAXSALQTY, A.OPNPRC, A.ZSLPRC, A.MSLPRC, A.PRICEOPT, A.MAXPRICE, A.MINPRICE, A.AVGCSPRC
FROM AABASPLUPRC A
LEFT JOIN AABASPLUMAIN B ON A.PLUID=B.PLUID
LEFT JOIN BASPLUMAIN  C ON B.PLUNO=C.PLUNO

insert into BASPLUDSC (PLUID, UPDATETIME, FLAG, XPBZ, STAT, BB, FILT)
SELECT C.PLUID, A.UPDATETIME, A.FLAG, A.XPBZ, A.STAT, A.BB, A.FILT
FROM AABASPLUDSC A
LEFT JOIN AABASPLUMAIN B ON A.PLUID=B.PLUID
LEFT JOIN BASPLUMAIN  C ON B.PLUNO=C.PLUNO

insert into BASPLUBCD(PLUID, BCD, ANAME, CLASS, PROD )
SELECT C.PLUID, A.BCD, A.ANAME, A.CLASS, A.PROD
FROM AABASPLUBCD A
LEFT JOIN AABASPLUMAIN B ON A.PLUID=B.PLUID
LEFT JOIN BASPLUMAIN  C ON B.PLUNO=C.PLUNO

【瑞星系统】转移商品资料,布布扣,bubuko.com

【瑞星系统】转移商品资料

标签:color   size   ui   dp   rom   a   ad   date   

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

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