??????????????????
???????????? ???????[ 2015/4/14 12:49:09 ] ????????????? ??? SQL
????--???SourceSN???????????SN??SNCust????------------------------------------------
????SELECT LotPK AS SourceLotPK??LotName AS SrouceLotName INTO#WorkLotX510 FROM MMLots WITH(NOLOCK)WHERE EXISTS(SELECT 1 FROM#WorkSourceSNT1 b WHERE b.SourceSN=MMLots.LotID)
????SELECT a.LotPK??a.SourceLotPK into#WorkLotX520 FROM MMLotOperations a WITH(NOLOCK)WHERE EXISTS(SELECT 1 FROM#WorkLotX510 b WHERE b.SourceLotPK=a.SourceLotPK)
????SELECT a.LotPK??a.SourceLotPK??b.SrouceLotName INTO#WorkLotX530 FROM#WorkLotX520 a JOIN#WorkLotX510 b ON a.SourceLotPK=b.SourceLotPK
????INSERT INTO#FinalLotName SELECT b.LotName??a.SrouceLotName??NULL FROM#WorkLotX530 a JOIN(SELECT LotPK??LotName FROM MMLots WITH(NOLOCK))b on a.LotPK=b.LotPK--b??????????WHERE RowDeleted=0?????
????SELECT a.LotName??a.SourceLotName??b.SNCust INTO#WorkLotX540 FROM#FinalLotName a LEFT JOIN CO_SN_LINK_CUSTOMER b WITH(NOLOCK)ON a.LotName=b.SNMes
????DELETE FROM#FinalLotName
????INSERT INTO#FinalLotName SELECT LotName??SourceLotName??SNCust FROM#WorkLotX540
????-------------------------------------------------------------------------------------
????SELECT SN??MaterialID??MESOrderID??OnPlantID INTO#WorkLotX550 FROM CO_SN_GENERATION a WITH(NOLOCK)
????WHERE SNType='IntSN'AND SNRuleName='ProductSNRule'AND OnPlantID=@OnPlant
????AND EXISTS(SELECT 1 FROM#FinalLotName b WHERE a.SN=b.LotName)
????INSERT INTO#FinalCO_SN
????SELECT a.LotName??a.SourceLotName??a.SNCust??b.MaterialID??c.ComMaterials??b.MESOrderID??b.OnPlantID??c.VendorID??c.DateCode??c.SNNote FROM#FinalLotName a
????LEFT JOIN#WorkLotX550 b ON a.LotName=b.SN
????LEFT JOIN#WorkSourceSNT1 c ON a.SourceLotName=c.SourceSN
????END
????END
????END
????--2.3
????IF@comdef<>''
????BEGIN
????SELECT Val INTO#WorkComdef FROM fn_String_To_Table(@comdef??'??'??1)
????--??@comdef??????????????SourceSN
????SELECT SN AS SourceSN??MaterialID AS ComMaterials??VendorID??DateCode??SNNote INTO#WorkSourceSNT16 FROM CO_SN_GENERATION a WITH(NOLOCK)WHERE EXISTS(SELECT 1 FROM#WorkComdef b WHERE a.MaterialID=b.Val)
????----------------------------------------------------------------------------------------------------
????--?????ж?(???????)???
????IF EXISTS(SELECT 1 FROM#FinalCO_SN)--???????ж???????????
????BEGIN
????SELECT a.LotName??a.SourceLotName??a.SNCust??a.MaterialID??a.ComMaterials??a.MESOrderID??a.OnPlantID??a.VendorID??a.DateCode??a.SNNote INTO#TMP516 FROM#FinalCO_SN a WHERE EXISTS(SELECT 1 FROM#WorkComdef b WHERE a.matl_def_id=b.Val)
????DELETE FROM#FinalCO_SN
????INSERT INTO#FinalCO_SN SELECT LotName??SourceLotName??SNCust??MaterialID??ComMaterials??MESOrderID??OnPlantID??VendorID??DateCode??SNNote FROM#TMP516
????END
????ELSE
????BEGIN
????IF EXISTS(SELECT 1 FROM#FinalLotName)
????BEGIN
????--???SourceLotName??????????
????SELECT a.SourceSN??a.VendorID??a.DateCode??a.SNNote??a.ComMaterials INTO#SourceLTX56 FROM#WorkSourceSNT16 a WHERE EXISTS(SELECT 1 FROM#FinalLotName b WHERE a.SourceSN=b.SourceLotName)
????--???SN??????????
????SELECT SN??MaterialID??MESOrderID??OnPlantID INTO#WorkSNT5106 FROM CO_SN_GENERATION a WITH(NOLOCK)
????WHERE SNType='IntSN'AND SNRuleName='ProductSNRule'AND OnPlantID=@OnPlant
????AND EXISTS(SELECT 1 FROM#FinalLotName b WHERE a.SN=b.LotName)
????INSERT INTO#FinalCO_SN
????SELECT a.LotName??a.SourceLotName??d.SNCust??b.MaterialID??c.ComMaterials??b.MESOrderID??b.OnPlantID??c.VendorID??c.DateCode??c.SNNote FROM#FinalLotName a
????LEFT JOIN#WorkSNT5106 b ON a.LotName=b.SN
????LEFT JOIN#WorkSourceSNT16 c ON a.SourceLotName=c.SourceSN
????LEFT JOIN CO_SN_LINK_CUSTOMER d WITH(NOLOCK)ON a.LotName=d.SNMes
????END
????ELSE
????BEGIN
????--???SourceSN???????????SN??SNCust????------------------------------------------
????SELECT LotPK AS SourceLotPK??LotName AS SrouceLotName INTO#WorkLotX5106 FROM MMLots WITH(NOLOCK)WHERE EXISTS(SELECT 1 FROM#WorkSourceSNT16 b WHERE b.SourceSN=MMLots.LotID)
????SELECT a.LotPK??a.SourceLotPK into#WorkLotX5206 FROM MMLotOperations a WITH(NOLOCK)WHERE EXISTS(SELECT 1 FROM#WorkLotX5106 b WHERE b.SourceLotPK=a.SourceLotPK)
????SELECT a.LotPK??a.SourceLotPK??b.SrouceLotName INTO#WorkLotX5306 FROM#WorkLotX5206 a JOIN#WorkLotX5106 b ON a.SourceLotPK=b.SourceLotPK
????INSERT INTO#FinalLotName SELECT b.LotName??a.SrouceLotName??NULL FROM#WorkLotX5306 a JOIN(SELECT LotPK??LotName FROM MMLots WITH(NOLOCK))b on a.LotPK=b.LotPK--b??????????WHERE RowDeleted=0?????
????SELECT a.LotName??a.SourceLotName??b.SNCust INTO#WorkLotX5406 FROM#FinalLotName a LEFT JOIN CO_SN_LINK_CUSTOMER b WITH(NOLOCK)ON a.LotName=b.SNMes
????DELETE FROM#FinalLotName
????INSERT INTO#FinalLotName SELECT LotName??SourceLotName??SNCust FROM#WorkLotX5406
????-------------------------------------------------------------------------------------
????SELECT SN??MaterialID??MESOrderID??OnPlantID INTO#WorkLotX5506 FROM CO_SN_GENERATION a WITH(NOLOCK)
????WHERE SNType='IntSN'AND SNRuleName='ProductSNRule'AND OnPlantID=@OnPlant
????AND EXISTS(SELECT 1 FROM#FinalLotName b WHERE a.SN=b.LotName)
????INSERT INTO#FinalCO_SN
????SELECT a.LotName??a.SourceLotName??a.SNCust??b.MaterialID??c.ComMaterials??b.MESOrderID??b.OnPlantID??c.VendorID??c.DateCode??c.SNNote FROM#FinalLotName a
????LEFT JOIN#WorkLotX5506 b ON a.LotName=b.SN
????LEFT JOIN#WorkSourceSNT16 c ON a.SourceLotName=c.SourceSN
????END
????END
????END
????/**
????*3)?????ж????
????**/
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????Щ????????????????????TC???????????????Щ???????????????????????????????????????????????(java .net ?????)???mysql???????????????????ж????д???Python???????????????(DB2)??????BufferPool????????????????????????????????6??????????????????滮???????????????-????????SQL Server???????????????????λ?????PHP??SQL????????????????????Pythonд???NoSQL????????? SQL ?е????????????? SQL ?е?????????Java???????:?????MySQL???????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????