One of the beautiful aspects of the Query response object is that you can access it like a struct of arrays. Because of CF's dynamic nature, you do have to give hints. This will work: arraySum(queryName["columnName"]) This win NOT: arraySum(queryName.columnName)
On Mon, Mar 10, 2008 at 1:53 PM, Charlie Griefer <[EMAIL PROTECTED]> wrote: > SQL function would be SUM() > > you could do it in CF via a few functions... > arraySum(listToArray(valueList(queryname.columnName))) i think... but > SUM in SQL would probably be the way to go in most cases. > > On Mon, Mar 10, 2008 at 10:43 AM, Chad Gray <[EMAIL PROTECTED]> wrote: > > I swear I remember a CF function that would total a query's results. > > > > Like if my query returns 10 rows of grandTotal and grandTotal is a > field that contains numbers. > > > > You could run a function and it would add the 10 rows together so you > get one number. > > > > Am I dreaming this? I cant find the function. > > > > Maybe it was a SQL function... > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300874 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

