Trouble with Sum
I'm have a numeric column called "weight" in an SQL 2000 database.
I use the following code to Sum the column,
strSQL = "SELECT SUM(weight) AS totalWeight FROM eddfile " _
& "WHERE epn = " & p_epn
response.write "total weight is: " & totalWeight
The problem is that although there are records in the query, the result is not displayed. This works fine if the sql column is set to money, but I can't get it to work for a numeric column. Has anybody seen this before?
Thanks for your help.
|