PANKAJINFO1
Registered User.
- Local time
- Today, 16:11
- Joined
- Jul 4, 2009
- Messages
- 16
I have a problem with the result of a Query.
Start Date
End Date
Query runs after entering unbound pameter text box Start and end date.
What i want is i am grouping of Opertaor, sum of defects between the dates.
but dates i am not able to group or sum or etc.
I want when the start and end date is entered
Operator Sum of Defects
A 25
B 75
C 12
SELECT tbloperator.[Operator Name] AS operator, tblModel.[Model Desc] AS Model, Sum([Daily Production].[Total Production]) AS Prod, Sum(tblinsp.[Number of Defects]) AS Defect, Round(([tblinsp].[Number of defects])/([daily production].[total production]*[tblmodel].[no of Joints])*1000000,2) AS PPM, tblModel.[No of Joints], Tblmain.date
FROM tbloperator INNER JOIN ((tblModel INNER JOIN [Daily Production] ON tblModel.Modelid = [Daily Production].[Model id]) INNER JOIN (tbldefect INNER JOIN (Tblmain INNER JOIN tblinsp ON Tblmain.inspid = tblinsp.inspid) ON tbldefect.defectid = tblinsp.defectid) ON tblModel.Modelid = tblinsp.modelid) ON tbloperator.operatorid = tblinsp.operatorid
WHERE (((Tblmain.date)=[daily production].[date]))
GROUP BY tbloperator.[Operator Name], tblModel.[Model Desc], Round(([tblinsp].[Number of defects])/([daily production].[total production]*[tblmodel].[no of Joints])*1000000,2), tblModel.[No of Joints], Tblmain.date, [Daily Production].[Model id]
HAVING (((Tblmain.date) Between [Forms]![Date Selection]![textdate] And [Forms]![Date Selection]![End date]))
ORDER BY tbloperator.[Operator Name];
Please help - Urgent
Start Date
End Date
Query runs after entering unbound pameter text box Start and end date.
What i want is i am grouping of Opertaor, sum of defects between the dates.
but dates i am not able to group or sum or etc.
I want when the start and end date is entered
Operator Sum of Defects
A 25
B 75
C 12
SELECT tbloperator.[Operator Name] AS operator, tblModel.[Model Desc] AS Model, Sum([Daily Production].[Total Production]) AS Prod, Sum(tblinsp.[Number of Defects]) AS Defect, Round(([tblinsp].[Number of defects])/([daily production].[total production]*[tblmodel].[no of Joints])*1000000,2) AS PPM, tblModel.[No of Joints], Tblmain.date
FROM tbloperator INNER JOIN ((tblModel INNER JOIN [Daily Production] ON tblModel.Modelid = [Daily Production].[Model id]) INNER JOIN (tbldefect INNER JOIN (Tblmain INNER JOIN tblinsp ON Tblmain.inspid = tblinsp.inspid) ON tbldefect.defectid = tblinsp.defectid) ON tblModel.Modelid = tblinsp.modelid) ON tbloperator.operatorid = tblinsp.operatorid
WHERE (((Tblmain.date)=[daily production].[date]))
GROUP BY tbloperator.[Operator Name], tblModel.[Model Desc], Round(([tblinsp].[Number of defects])/([daily production].[total production]*[tblmodel].[no of Joints])*1000000,2), tblModel.[No of Joints], Tblmain.date, [Daily Production].[Model id]
HAVING (((Tblmain.date) Between [Forms]![Date Selection]![textdate] And [Forms]![Date Selection]![End date]))
ORDER BY tbloperator.[Operator Name];
Please help - Urgent