|
-
Feb 19th, 2001, 05:48 PM
#1
Thread Starter
Hyperactive Member
I have been asked to code a page which will list everyone in a database, give the total number of records for each rep (between dates specified) and average a field called "Score".
I know the idea is to SELECT Count(Score), ... which will let me list each rep and and the number of records for each. I have the page that is doing that right now, but the % is what I'm having a problem with. How do I make it add all scores together and then divide by rst(intRecordCount)?
If you think education is expensive, try ignorance.
-
Feb 20th, 2001, 10:54 AM
#2
Black Cat
See if SELECT AVG(Score) ... works. Or if that doesn't, see if SUM(Score) works, get that and divide by the count. They work with Access, I'm unsure if they're standard SQL. Else, get the count and then loop through the recordset, sum it up yourself and divide by the count.
Josh
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|