Sub-Totaling

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with following columns:
tblDate, tblEmployeeID, tblBreakTime

There are 5-10 entries on one day. I would like combine the entries and
sub-total the BreakTime per date.

Can anyone help.

Thanks in advance
Mike Chamis
 
Dear Mike:

SELECT tblDate, tblEmployeeID, SUM(tblBreakTime) AS TotalBreakTime
FROM YourTable
GROUP BY tblDate, tblEmployeeID

A note about using prefixes. tbl is commonly used to denote a table. You
seem to be using it to denote the names of columns within a table.
Confusing to me, anyway!
 
Thanks for your help Tom...
Mike

Tom Ellison said:
Dear Mike:

SELECT tblDate, tblEmployeeID, SUM(tblBreakTime) AS TotalBreakTime
FROM YourTable
GROUP BY tblDate, tblEmployeeID

A note about using prefixes. tbl is commonly used to denote a table. You
seem to be using it to denote the names of columns within a table.
Confusing to me, anyway!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top