Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping table records within a query 1

Status
Not open for further replies.

timabc123

Programmer
Oct 9, 2001
1
GB
Hi,

I have a table with various headings (employee id, WorkTypeA, WorkTypeB, WorkTypeC, WorkTypeD etc..).

Employee id is not unique.

I need to create a query which will group all of the same employee id together (ie each individual employee) and sum all of the worktypes for that employee id.

Please Help!! Thank you.
 
Try to paste this code in the query SQL view, I think it will work.

SELECT DISTINCT EmployeeID, Sum(Worktypes) AS Total
FROM TableName
GROUP BY EmployeeID

Tin Tin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top