Query Calculations

joe31709

Registered User.
Local time
Today, 10:11
Joined
May 12, 2003
Messages
54
I have a query that deals with a table of time.

In that table I have mission/reimbursable work info.

In the query , for tasking, if the field is null , it is Mission work and if not then it has a tasking assigned to it. Okay now here is my problem, I am not sure how to find total hours worked , for the day. I want to be able to break it down for mission hours for the day and reimbursable hours for the day, all hours with a tasking.

Any ideas?
 
Can you give me an example of the fields or a query you have started.


sound like you need a group by clause with sum

like this

select sum(field)
form table
group by some field
 
SELECT [EMPLOYEE].[First Name], Time.DATE, Time.[REG HRS], Time.[JON'S], Time.[Task (SCC)], [EMPLOYEE].Grade, Time.[OVER TIME], Time.[COST CODES], Nz([task (scc)],"Mission") AS NewField, IIf(IsNull([reg hrs]),0,[reg hrs])+IIf(IsNull([over time]),0,[over time]) AS [Total Hours]
FROM [EMPLOYEE] INNER JOIN [Time] ON [EMPLOYEE].[Last Name] = Time.[Last Name]
WHERE (((Time.DATE)=[enter Date]));


That is query right there. I want it to be able to give me a sum of hours worked that are mission and a sum of hours that are reimbursable.

If I have to make another query that would be fine also.
 

Users who are viewing this thread

Back
Top Bottom