By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 2,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Summing up number of hours based on date and employee

P: n/a
Hi

I have two queries where in I calculated number of hours worked by an
employee.

Fields for the first query

Meeting Id ( Auto Number )
Counselor ID ( text )
Date
Start Time
End Time
Minutes
Fields for the second query

Counselor ID ( text)
Client ID
Date
Start Time
End Time
Minutes

Now how do I sum up the minutes by grouping Counselor ID and date.

Thanks

Sep 7 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You have it so well described that the answer seems almost obvious.
(Nice job with the description, I guess...)

SELECT CounselorID, Date, Sum(Minutes) As TotalMinutes
FROM qrySecondQuery
WHERE.... <put any filters here>
ORDER BY CounselorID, Date
GROUP BY ConselorID, Date;

btw, don't use "DATE" as a field name. It's a reserved word in VB, and
SQL, so you're asking for trouble doing that.

Sep 7 '06 #2

P: n/a
You have it so well described that the answer seems almost obvious.
(Nice job with the description, I guess...)

SELECT CounselorID, Date, Sum(Minutes) As TotalMinutes
FROM qrySecondQuery
WHERE.... <put any filters here>
GROUP BY ConselorID, Date
ORDER BY CounselorID, Date;

btw, don't use "DATE" as a field name. It's a reserved word in VB, and
SQL, so you're asking for trouble doing that.

Sep 7 '06 #3

P: n/a
Do U want me to paste this in SQL view and run it. I am new to Access
and have no idea abt SQL.
pi********@hotmail.com wrote:
You have it so well described that the answer seems almost obvious.
(Nice job with the description, I guess...)

SELECT CounselorID, Date, Sum(Minutes) As TotalMinutes
FROM qrySecondQuery
WHERE.... <put any filters here>
ORDER BY CounselorID, Date
GROUP BY ConselorID, Date;

btw, don't use "DATE" as a field name. It's a reserved word in VB, and
SQL, so you're asking for trouble doing that.
Sep 7 '06 #4

P: n/a

King wrote:
Do U want me to paste this in SQL view and run it. I am new to Access
and have no idea abt SQL.
the easiest way is to open a new query, click the SQL button and then
paste it.

Sep 7 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.