??????????????????
???????????? ???????[ 2015/4/14 12:49:09 ] ????????????? ??? SQL
????IF EXISTS(SELECT 1 FROM#FinalLotName)
????BEGIN
????IF EXISTS(SELECT 1 FROM#FinalCO_SN)
????BEGIN--3.1
????SELECT a.matl_def_id??b.Descript??a.MESOrderID AS pom_order_id??a.SN AS LotName??a.SourceSN AS ComLot??
????a.ComMaterials??c.Descript AS ComMatDes??a.VendorID??a.DateCode??a.SNNote??
????OnPlantID??SNCust FROM#FinalCO_SN a
????JOIN MMDefinitions b WITH(NOLOCK)ON a.matl_def_id=b.DefID
????JOIN MMDefinitions c WITH(NOLOCK)ON a.ComMaterials=c.DefID
????WHERE NOT EXISTS(select distinct SN??SourceSN from#FinalCO_SN x
????where x.SN=a.SourceSN and x.SourceSN=a.SN)
????END
????ELSE
????BEGIN--3.2
????--3.2.1???SN???????
????SELECT SN??MaterialID??MESOrderID??OnPlantID INTO#FinalSNX1 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)
????--3.2.2???SourceSN???????
????SELECT a.SN AS SourceLotName??a.VendorID??a.DateCode??a.SNNote??a.MaterialID AS ComMaterials INTO#FinalSNX2 FROM CO_SN_GENERATION a WITH(NOLOCK)WHERE EXISTS(SELECT 1 FROM#FinalLotName b WHERE a.SN=b.SourceLotName)
????SELECT b.MaterialID AS matl_def_id??x.Descript??b.MESOrderID AS pom_order_id??b.SN AS LotName??c.SourceLotName AS ComLot??c.ComMaterials??y.Descript AS ComMatDes??c.VendorID??c.DateCode??c.SNNote??b.OnPlantID??a.SNCust
????FROM#FinalLotName a
????LEFT JOIN#FinalSNX1 b ON a.LotName=b.SN
????LEFT JOIN#FinalSNX2 c ON a.SourceLotName=c.SourceLotName
????JOIN MMDefinitions x WITH(NOLOCK)ON b.MaterialID=x.DefID
????JOIN MMDefinitions y WITH(NOLOCK)ON c.ComMaterials=y.DefID
????WHERE NOT EXISTS(
????SELECT DISTINCT*FROM#FinalLotName z
????WHERE z.LotName=a.SourceLotName and z.SourceLotName=a.LotName
????)
????END
????END
????ELSE
????BEGIN
????IF EXISTS(SELECT 1 FROM#FinalCO_SN)
????BEGIN--3.3
????SELECT a.matl_def_id??b.Descript??a.MESOrderID AS pom_order_id??a.SN AS LotName??a.SourceSN AS ComLot??
????a.ComMaterials??c.Descript AS ComMatDes??a.VendorID??a.DateCode??a.SNNote??
????OnPlantID??SNCust FROM#FinalCO_SN a
????JOIN MMDefinitions b WITH(NOLOCK)ON a.matl_def_id=b.DefID
????JOIN MMDefinitions c WITH(NOLOCK)ON a.ComMaterials=c.DefID
????WHERE NOT EXISTS(select distinct SN??SourceSN from#FinalCO_SN x
????where x.SN=a.SourceSN and x.SourceSN=a.SN)
????END
????ELSE
????BEGIN--3.4
????PRINT'There is no queryable condition??please enter at less a query conditon.'
????END
????END
????END
????GO
??????????????????????????????????????????????????????λ???????
????????SSRS?????滻???洢?????SQL????????????????B/S??????1~2??
??????.???
?????????????????????????????????д???????????SQL??????д??????????SQL???????????????
???????????????????????????????????&???SQL???д??&?????????????????????п??????????θ??£?????????????????????????with(nolock)??????????????????????
???????????????????????漰???????????????????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 ??????