Evil, EVIL report !

Guillaume777

Registered User.
Local time
Yesterday, 21:33
Joined
May 4, 2006
Messages
23
Say my table looks like this

Name Hours Wages per hour

John 7 7,75$
John 9 7,75$
John 10 8,75$
John 2 8,75$
Mary 3 7,75$
Mary 4 10,75$

How do I make the reports look like this :

Name Total hours Wages per hour

John 16 7,75$
John 12 8,75$
Mary 3 7,75$
Mary 4 10,75$


I know how to calculate the total hours of someone, but how do I show the data on separate lines and calculate the separate totals when the wages per hour aren't the same ?
 
Thanks, it works ! :)

However if I change

Select [Name], Sum(Hours) As SumHours, [Wages per hour] From YourTable Group By [Name], [Wages per hour];

to

Select [Name], Sum(Hours) As SumHours, [Wages per hour] From YourTable

or to

Select [Name], Sum(Hours) As SumHours, [Wages per hour] From YourTable Group By [Name]

It gives me errors !!! How come I can't change it without it giving me errors ?
 
you have to use one of the totals function on each of the fields.
 
Thanks for the help, and I will never use "Name" again as a column name
 

Users who are viewing this thread

Back
Top Bottom