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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totals Again

Status
Not open for further replies.

penret

Technical User
Nov 14, 2003
13
US
My table has Client, consultant, hours worked etc. fields
Each client has a consultant where hours worked are logged.
At times another consultant will work for this client and their hours are logged under their name.

In my query each entry shows separately with the main consultant 60 hours attached to the other consultants' hours

Client consultant 60 hours Other consultant 2 hours
Client consultant 60 hours Other consultant 1 hour
Client consultant 60 hours Other consultant 3 hours

What do I need to do to combine the totals to read 66 hours on one line? Thanks a lot
 
You can try this

Select TableName.ClientConsultant, Sum(Tablename.OtherConsultant) As SumOfOthers, (ClientConsultant + SumOfOthers) As TotalHours
From TableName
GroupBy TableName.ClientConsultant

See if that does it for you.

Paul
 
Hi!

Could you post the exact layout of the table you are discussing along with several sample records.

Thanks!


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top