hi
i have a very big problem this query takes a very long time
i found that the only problem is the "(R_Batch_Test_V.tDate BETWEEN ShamirOp.dbo.CeramicLine.proc_date AND '040404')" part of the where condintion,
when i take off this part the query run fast.
need help!!!
thank you
SELECT R_Batch_Test_V.CNC, R_Batch_Test_V.ceramicId, R_Batch_Test_V.client, Count(R_Batch_Test_V.passB) AS Total,
ShamirOp.dbo.CeramicHead.product_no
FROM ((R_Batch_Test_V INNER JOIN ShamirOp.dbo.CeramicHead ON R_Batch_Test_V.CNC = ShamirOp.dbo.CeramicHead.ceramic_no) INNER JOIN ShamirOp.dbo.CeramicLine ON
(ShamirOp.dbo.CeramicHead.ceramic_no = ShamirOp.dbo.CeramicLine.ceramic_no) AND
(R_Batch_Test_V.ceramicId = ShamirOp.dbo.CeramicLine.serial_no)) INNER JOIN ShamirOp.dbo.Batch ON
R_Batch_Test_V.batch_no = ShamirOp.dbo.Batch.batch_no
WHERE (R_Batch_Test_V.tDate BETWEEN ShamirOp.dbo.CeramicLine.proc_date AND '040404') AND (ShamirOp.dbo.Batch.work_order_no Not Like 'pi%') AND ([client]= 'CD2') AND ShamirOp.dbo.CeramicHead.product_no=3
GROUP BY R_Batch_Test_V.CNC, R_Batch_Test_V.ceramicId, R_Batch_Test_V.client
, ShamirOp.dbo.CeramicHead.product_no
i have a very big problem this query takes a very long time
i found that the only problem is the "(R_Batch_Test_V.tDate BETWEEN ShamirOp.dbo.CeramicLine.proc_date AND '040404')" part of the where condintion,
when i take off this part the query run fast.
need help!!!
thank you
SELECT R_Batch_Test_V.CNC, R_Batch_Test_V.ceramicId, R_Batch_Test_V.client, Count(R_Batch_Test_V.passB) AS Total,
ShamirOp.dbo.CeramicHead.product_no
FROM ((R_Batch_Test_V INNER JOIN ShamirOp.dbo.CeramicHead ON R_Batch_Test_V.CNC = ShamirOp.dbo.CeramicHead.ceramic_no) INNER JOIN ShamirOp.dbo.CeramicLine ON
(ShamirOp.dbo.CeramicHead.ceramic_no = ShamirOp.dbo.CeramicLine.ceramic_no) AND
(R_Batch_Test_V.ceramicId = ShamirOp.dbo.CeramicLine.serial_no)) INNER JOIN ShamirOp.dbo.Batch ON
R_Batch_Test_V.batch_no = ShamirOp.dbo.Batch.batch_no
WHERE (R_Batch_Test_V.tDate BETWEEN ShamirOp.dbo.CeramicLine.proc_date AND '040404') AND (ShamirOp.dbo.Batch.work_order_no Not Like 'pi%') AND ([client]= 'CD2') AND ShamirOp.dbo.CeramicHead.product_no=3
GROUP BY R_Batch_Test_V.CNC, R_Batch_Test_V.ceramicId, R_Batch_Test_V.client
, ShamirOp.dbo.CeramicHead.product_no