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

Query Problem

Status
Not open for further replies.

sha123

Programmer
Nov 13, 2002
58
ZA
I have a table with several staff members, from that table I need to get the efficiency of each employee.

At the moment I am getting it but only one per page in my report I need the whole section on one page.

Fields in table:
Name | Date | Product | Efficiency |

Name Expr1 Expr2 STD Kg Expr3 Expr4 Eff
Angelina Z48 0 50 0.1 6 0.12 120
Angelina Z48 120 120 0.1 6 0.05 50
Angelina Z48 0 40 0.1 3 0.075 75
Angelina Z48 0 45 0.1 6 0.013 133.3
Angelina Z48 120 120 0.29 6 0.05 17.24
Georgina A12 120 120 0.1 6 0.05 50

This is example of my query result.

I need it to add for example all Angelina Z48 EFF together and devide it by the amount of entries for her and give a total.
It should then take all Georgina A12 Eff add it together and devide it by the amount of entries for her. Then I need both on the same report to get a grand total for the whole section!

Does anyone know how to do this????
 
"SELECT Name, Count(Name) As RowCount, Sum(Eff) As SumOfEff FROM tblTableName GROUP BY Name"



The result you need from the query is then

Name SumOfEff/RowCount


Depending on where you are using it you might combine the division inside the query or leave it until later so that you have the individual components to work with.



'ope-that-'elps.



'ope-that-'elps.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Do I add this under the properties of the rereport
 
I don't understand that last question - maybe you'd better explain exactly what it is you are trying to do.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top