Last post Apr 19, 2013 07:32 PM by prog4fun
Apr 19, 2013 05:07 PM|prog4fun|LINK
I have a database with the distances made by runners. How can I make the sum of the column distance? I have tried this code:
var distanceSum = db.Query("SELECT SUM (distance) FROM Run");
but I receive this message:
What should I do?
Apr 19, 2013 06:07 PM|GmGregori|LINK
Your statement is formally correct.
Have you a table named "Run" with a numeric field named "distance"?
Is the error message at the "var distanceSum
= db...." row?
Apr 19, 2013 07:32 PM|prog4fun|LINK
Thanks a lot! I have just find it! I forgot to put Value to db.Query (db.QueryValue).