Using SUM Function in An SQL Statement
| Published on 8/7/2008 by Site Editor More articles in ASP
|
Sum function can be used for to get the sum of a numeric expression evaluated over a set. This function must be placed in an SQL statement. Following example will return the sum of ratings in articles.
In this example we have used our old database. There was a rating column holding the votes of our articles. We were using this simple script to check sum of ratings.
Set cn = server.createobject("adodb.connection") |
no comments submitted



