优化一下这句sql , select IssuedQty '分拣数量',ScanQty '扫码数量', StandardCapacity as '标准小时产能',b.QtySumassembly as '累加BOM用量', (2*StandardCapacity*b.QtySumassembly) as 'JIT可分拣数量', * from Prod_Issued as a INNER join vwLinePlanOrderApplyDtl as b on a.ManufDopId = b.ManufDopId and a.ItemCode = b.ItemCode and a.ProductLineNo = b.ProductLineNo where BillNo ='202302200199' AND DataType > 0 AND DataType < 3 and a.ProductLineNo='M1904' and a.IsJITMaterial = 1
时间: 2023-03-15 15:01:14 浏览: 119
优化后的SQL语句如下:SELECT IssuedQty 分拣数量, ScanQty 扫码数量, StandardCapacity AS 标准小时产能, b.QtySumassembly AS 累加BOM用量, (2 * StandardCapacity * b.QtySumassembly) AS JIT可分拣数量 FROM Prod_Issued AS a INNER JOIN vwLinePlanOrderApplyDtl AS b ON a.ManufDopId = b.ManufDopId AND a.ItemCode = b.ItemCode AND a.ProductLineNo = b.ProductLineNo WHERE BillNo = 202302200199 AND DataType > 0 AND DataType < 3 AND a.ProductLineNo = M1904 AND a.IsJITMaterial = 1;
阅读全文