Crash1hd
01-07-2005, 09:31 AM
In the following code
SQL = "Select * From CouponCode Order By FromEmail"
Set HRS = Conn.Execute(SQL)
do until HRS.EOF
Response.write HRS("CCDValue")
HRS.movenext
Loop
would give me the last value in the list of fields in a table in my db so say I had three values 10 15 and 5 it would show me 5 how can I get it to show me 30 as that is the sum of the three values I tried
SQLA = "Select Sum(CCDValue) From CouponCode"
but dont know how to get the values!
SQL = "Select * From CouponCode Order By FromEmail"
Set HRS = Conn.Execute(SQL)
do until HRS.EOF
Response.write HRS("CCDValue")
HRS.movenext
Loop
would give me the last value in the list of fields in a table in my db so say I had three values 10 15 and 5 it would show me 5 how can I get it to show me 30 as that is the sum of the three values I tried
SQLA = "Select Sum(CCDValue) From CouponCode"
but dont know how to get the values!