One method to do this is use the ValueList function, which returns a 
list of all the values in a query column, then convert the list to an 
array and use the ArraySum function.

expense_total = ArraySum(ListToArray(ValueList(getexpenses.expensevalue)));

Judah

Steve Good wrote:
> I'm back with another dumb question.
> 
> I am trying to get the sum of an expenses column for all rows.  I have 
> no clue how to go about this.  I played around with cfloop a little bit, 
> but just ended up adding the current row's column to itself, then moving 
> on to the next row and doing the same.
> 
> I'm sure it's an easy thing to do, but for the life of me I can't figure 
> it out.
> 
> Thanks in advance for the help :)
> 
> ~Steve



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267819
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to