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

how to get total for client in SQL query

Status
Not open for further replies.

nhtraven

Technical User
Dec 10, 2000
114
US
Hi All,

I am having trouble with the syntax for a total. I have a select query that is grouped, then i use the this query in the recordsource for a report, also adding 2 other tables to it. all tied together the sql source is this:

SELECT hoursvbill.WorkDescription, hoursvbill.BillableHours, hoursvbill.DateWorked, hoursvbill.[Client #], hoursvbill.[Company Name], hoursvbill.BillableHours, [Time Cards].TimeCardID, Employees.FirstName, Employees.BillingRate, ([BillingRate]*[BillableHours]) AS HourlyBill
FROM Employees INNER JOIN (hoursvbill INNER JOIN [Time Cards] ON hoursvbill.TimeCardID = [Time Cards].TimeCardID) ON Employees.EmployeeID = [Time Cards].EmployeeID;

I have the total for each record, but now i need to total each client. ANy ideas?

Thanks
Raven
 
In your report you should be able to click on the sorting and grouping box and add the client field to it (client# i think you said). This will allow you to have a sum of whichever fields you want by client. I think that's what you're looking for, hope that helps.

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top