Hey guys I suspect this will be an easy answer but I cant seem to find it searching around. Simply put I want to sum the act prod hours together in a baq report. For example the Baq displays:
Job 1: 0.25
Job 1: 0.10
Job 1: 1.05
What this tells me is job 1 has three ops and the act times of each are listed. However, I want the full time for the job displayed on a singe line which would read:
Job 1: 1.40
You need to group by your job num. Remove the act prod hours from the output fields, and instead put in a sum field to aggregate the values. I pull the values from LaborDtl. Something like this should work:
select
[LaborDtl].[JobNum] as [LaborDtl_JobNum],
(sum(LaborDtl.LaborHrs)) as [Calculated_ActHrs]
from Erp.LaborDtl as LaborDtl
group by [LaborDtl].[JobNum]
I am new to calculated fields/SQL. I am still having some trouble. I created a simple test baq with only labordtl jobnum and laborhrs to simplify things. Should I be doing something with the [Calculated_ActHrs] in the second line? I receive an error stating bad SQL statement when I test the BAQ.