日期:2014-05-17 浏览次数:20528 次
SELECT B.TB015, --预计领料 D.AE004 --计划开始 --UPDATE [192.168.90.15].YY.dbo.MOCTB --SET TB015 = D.AE004 FROM [192.168.90.15].YY.dbo.MOCTA AS A, [192.168.90.15].YY.dbo.MOCTB AS B, [192.168.90.15].YY.dbo.CMSMW AS C, APSMERP AS D WHERE A.TA001=B.TB001 AND A.TA002=B.TB002 AND C.MW001=B.TB006 AND A.TA006=D.AE001 Collate Chinese_PRC_CI_AS AND C.MW002=D.AE002 Collate Chinese_PRC_CI_AS AND B.TB003=D.AE003 Collate Chinese_PRC_CI_AS AND A.TA006 IN (select DISTINCT CD001 from [192.168.90.15].YY.dbo.APSCODE) AND A.TA011<>'Y' AND A.TA011<>'y' AND A.TA013='Y' AND B.TB004 - B.TB005 >0
UPDATE [192.168.90.15].YY.dbo.MOCTB SET TB015 = D.AE004 FROM [192.168.90.15].YY.dbo.MOCTA AS A, [192.168.90.15].YY.dbo.MOCTB AS B, [192.168.90.15].YY.dbo.CMSMW AS C, APSMERP AS D WHERE A.TA001=B.TB001 AND A.TA002=B.TB002 AND C.MW001=B.TB006 AND A.TA006=D.AE001 Collate Chinese_PRC_CI_AS AND C.MW002=D.AE002 Collate Chinese_PRC_CI_AS AND B.TB003=D.AE003 Collate Chinese_PRC_CI_AS AND A.TA006 IN (select DISTINCT CD001 from [192.168.90.15].YY.dbo.APSCODE) AND A.TA011<>'Y' AND A.TA011<>'y' AND A.TA013='Y' AND B.TB004 - B.TB005 >0