1、这样测试有没问题?
Select WOR1.PlannedQty / (Case WHEN WOR1.BaseQty >= 1 Then floor(WOR1.BaseQty) Else 1 End) As 最大毛坯 FROM OWOR INNER JOIN WOR1 ON OWOR.DocEntry = WOR1.DocEntry WHERE OWOR.DocNum = 1252
2、这样测试有没问题?
select max(最大毛坯) from (Select WOR1.PlannedQty / (Case WHEN WOR1.BaseQty >= 1 Then floor(WOR1.BaseQty) Else 1 End) As 最大毛坯 FROM OWOR INNER JOIN WOR1 ON OWOR.DocEntry = WOR1.DocEntry WHERE OWOR.DocNum = 1252) as a
3、这样测试有没问题?
Select max(WOR1.PlannedQty / (Case WHEN WOR1.BaseQty >= 1 Then round(WOR1.BaseQty) Else 1 End)) As 最大毛坯 FROM OWOR INNER JOIN WOR1 ON OWOR.DocEntry = WOR1.DocEntry WHERE OWOR.DocNum = 1252