diddydustin
Programmer
Hey guys,
I'm using the following query:
SELECT EMR_EmployeeHistory.Press_Operator, EMR_EmployeeHistory.SecondPressman, EMR_EmployeeHistory.Feeder,
EMR_TotalGraphicTime.Time_Code,
EMR_TotalGraphicTime.[Sum Of Time_Total] AS [SUM]
FROM
EMR_EmployeeHistory
INNER JOIN
EMR_TotalGraphicTime ON EMR_EmployeeHistory.Job_ID = EMR_TotalGraphicTime.Job_ID
GROUP BY
EMR_EmployeeHistory.Press_Operator,
EMR_EmployeeHistory.SecondPressman, EMR_EmployeeHistory.Feeder,
EMR_TotalGraphicTime.Time_Code,
EMR_TotalGraphicTime.[Sum Of Time_Total], EMR_TotalGraphicTime.Job_ID,
EMR_EmployeeHistory.Job_ID
HAVING (((EMR_EmployeeHistory.Job_ID)=[EMR_TotalGraphicTime].[Job_Id]));
It returns all times depending on Job_ID and associates each time with it's specific time code. However, for each job id, i want all times with time code 100 to return one value, all times with time code 900 to return another value, and everything else to total up to a third value. the query now returns every time code and also returns more then one line for, say, time code 100.
thanks in advance
dustin
I'm using the following query:
SELECT EMR_EmployeeHistory.Press_Operator, EMR_EmployeeHistory.SecondPressman, EMR_EmployeeHistory.Feeder,
EMR_TotalGraphicTime.Time_Code,
EMR_TotalGraphicTime.[Sum Of Time_Total] AS [SUM]
FROM
EMR_EmployeeHistory
INNER JOIN
EMR_TotalGraphicTime ON EMR_EmployeeHistory.Job_ID = EMR_TotalGraphicTime.Job_ID
GROUP BY
EMR_EmployeeHistory.Press_Operator,
EMR_EmployeeHistory.SecondPressman, EMR_EmployeeHistory.Feeder,
EMR_TotalGraphicTime.Time_Code,
EMR_TotalGraphicTime.[Sum Of Time_Total], EMR_TotalGraphicTime.Job_ID,
EMR_EmployeeHistory.Job_ID
HAVING (((EMR_EmployeeHistory.Job_ID)=[EMR_TotalGraphicTime].[Job_Id]));
It returns all times depending on Job_ID and associates each time with it's specific time code. However, for each job id, i want all times with time code 100 to return one value, all times with time code 900 to return another value, and everything else to total up to a third value. the query now returns every time code and also returns more then one line for, say, time code 100.
thanks in advance
dustin