Sub-Totaling

M

Mike

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
 
T

Tom Ellison

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!
 
M

Mike

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!
 
Top