Nike Air Jordans - Cheap Flights - vShare YouTube Clone - Payday Advance - Cheap Flights

PDA

View Full Version : ASP SQL (Sum) Help Needed


onestop
Feb 25th 2005, 9:19 am
Hi everybody
I need some help. I'm not good at ASP, and have a question. I've written an sql query to create txt output which displays the letters of alphabet in the first column, and total number of students whose names start with that letter in the second column. Something like this:
A 340
B 234
C 879
D 254
.. ....
.. ....
.. ....
Z 354
How can I print the total number of students (sum) in ASP?
I want to have the sum of 234, 879, 254, ...., 354 saying "total number of students = "..."
any help is appreciated. I have to finish this urgent.
thanks in advance

J.D.
Feb 25th 2005, 9:56 am
How can I print the total number of students (sum) in ASP?
I want to have the sum of 234, 879, 254, ...., 354 saying "total number of students = "..."
any help is appreciated. I have to finish this urgent.
thanks in advanceCreate a variable to store the total count and as you go through your result set in ASP, row by row, add the letter count to the total count (e.g. total = total + rs.Fields("letter_count")).

J.D.