PDA

View Full Version : Adding up a field of numbers.


Morgoth
09-10-2002, 05:01 AM
I have a field that has numbers going down it.
http://24.226.62.28/CF_1.png
Now I need to be able to ADD up all the numbers and put it in "IntNumbers".

I am not sure how I can do this, my mind has gone a total blank, so I will be trying my ways with EOF and what not, and hope someone can help me before I waste my time trying unworking methods :)

Thank you.

Morgoth
09-10-2002, 05:38 AM
I got it!

SQL = "SELECT sum(MY_FIELD) AS IntNumbers FROM mytable"
Set oRS = oConn.Execute(SQL)
IntNumbers = oRS("IntNumbers")
Response.Write IntNumbers


:)
I love it when I get the answer before someone replys :) It makes me feel smart... :)!!!