i think you better use some SQL functions rather than look for a cold fusion solution for this?
 
for example, SELECT [name], isnull(SUM([amount]), 0) as totalamount FROM [YourTable]
 
search for SUM, AVG, COUNT, MAX, MIN, STDEV, VAR, GROUP BY for more details.
 
 
rgds,
 

=============================
Mike Lau
Web Developer

[EMAIL PROTECTED]
www.userinmind.com
=============================

 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
Sent: Wednesday, April 10, 2002 10:38 AM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] math functions on multiple rows

Hello All,
 
I have query that returns approx 2500 records.  The fields are name, address, amount due, interest etc.  At the bottom of my display page I would like to add up all the values in the amount due, and add up all the interest amounts etc.
 
I have done math on two or three variables but never on so many values. Can anyone point me in the right direction.
 
Thanks
 
Mike
 

Reply via email to