Have a table with the following fields:
job number (integer primary key)
date repaired (date)
repaired by (text non-unique)
tre (text non-unique)
What is needed is a report that lists the 'repaired by' and [count]number of repairs, [count]'tre' that is set to yes and the 'job number' if tre is set to yes. I can get what is needed with the following 2 SQL statements but was wondering if there is a way to combined them into one statement.
SQL #1
SELECT [Tool Room Operator Table].[Repaired By], Count('Repaired By') AS Total_Dies
FROM [Tool Room Operator Table]
WHERE ((([Tool Room Operator Table].[Date Repaired]) Between [Enter Start Date] And [Enter End Date]))
GROUP BY [Tool Room Operator Table].[Repaired By];
SQL #2
SELECT [Tool Room Operator Table].[Repaired By], [Tool Room Operator Table].[Job Number], count('TRE') AS Total_TREs
FROM [Tool Room Operator Table]
WHERE ((([Tool Room Operator Table].[Date Repaired]) Between [Enter Start Date] And [Enter End Date]) AND (([Tool Room Operator Table].TRE)="yes")
GROUP BY [Tool Room Operator Table].[Repaired By], [Tool Room Operator Table].[Job Number];
Any suggestions would be appreciated.
TIA
Regards,
longhair
job number (integer primary key)
date repaired (date)
repaired by (text non-unique)
tre (text non-unique)
What is needed is a report that lists the 'repaired by' and [count]number of repairs, [count]'tre' that is set to yes and the 'job number' if tre is set to yes. I can get what is needed with the following 2 SQL statements but was wondering if there is a way to combined them into one statement.
SQL #1
SELECT [Tool Room Operator Table].[Repaired By], Count('Repaired By') AS Total_Dies
FROM [Tool Room Operator Table]
WHERE ((([Tool Room Operator Table].[Date Repaired]) Between [Enter Start Date] And [Enter End Date]))
GROUP BY [Tool Room Operator Table].[Repaired By];
SQL #2
SELECT [Tool Room Operator Table].[Repaired By], [Tool Room Operator Table].[Job Number], count('TRE') AS Total_TREs
FROM [Tool Room Operator Table]
WHERE ((([Tool Room Operator Table].[Date Repaired]) Between [Enter Start Date] And [Enter End Date]) AND (([Tool Room Operator Table].TRE)="yes")
GROUP BY [Tool Room Operator Table].[Repaired By], [Tool Room Operator Table].[Job Number];
Any suggestions would be appreciated.
TIA
Regards,
longhair