标签: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
标签:color size ui dp rom a ad date
原文地址:http://www.cnblogs.com/nlg3413/p/3871564.html