1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| SELECT AG.DLG_BHD_BTCH_BatchID_value
, AG.StartTime
, AG.EndTime
, AG.TotalLength
, AG.MinDLG_CTRL_COLD_DiameterPVXY
, AG.MaxDLG_CTRL_COLD_DiameterPVXY
, AG.AvgDLG_CTRL_COLD_DiameterPVXY
, AG.StdevDLG_CTRL_COLD_DiameterPVXY
, AG.MinDLG_CTRL_COLD_OvalityPV
, AG.MaxDLG_CTRL_COLD_OvalityPV
, AG.AvgDLG_CTRL_COLD_OvalityPV
, AG.StdevDLG_CTRL_COLD_OvalityPV
, BHD.BHD_BHD_BTCH_BatchID_value
, BHD.BHD_BHD_BTCH_PresetLength_value
, BHD.BHD_BHD_BTCH_RecipeName_value
, BHD.BHD_BHD_BTCH_StatisticsON_value
, BHD.BHD_CTRL_COLD_DiameterLSL_value
, BHD.BHD_CTRL_COLD_DiameterSP_value
, BHD.BHD_CTRL_COLD_DiameterUSL_value
, BHD.BHD_CTRL_COLD_OvalityUSL_value
, CP.Cp AS Cp_COLD_Diameter
, dbo.fnCpK(BHD.BHD_CTRL_COLD_DiameterUSL_value, BHD.BHD_CTRL_COLD_DiameterLSL_value, AG.AvgDLG_CTRL_COLD_DiameterPVXY, AG.StdevDLG_CTRL_COLD_DiameterPVXY) AS CpK_COLD_Diameter
FROM dbo.BHD AS BHD
INNER JOIN dbo.ViewDLG_Aggregate AS AG
ON BHD.BHD_BHD_BTCH_BatchID_value = AG.DLG_BHD_BTCH_BatchID_value
CROSS APPLY dbo.fnCp(BHD.BHD_CTRL_COLD_DiameterUSL_value, BHD.BHD_CTRL_COLD_DiameterLSL_value, AG.StdevDLG_CTRL_COLD_DiameterPVXY) AS CP |
Partager