Without messing with the Function, you could throw MAXROWS attributes in the CFQuery tag maxrows="1". Not the "good" solution, but one that should work.
...................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: John Seelye [mailto:[EMAIL PROTECTED] Sent: Thursday, February 22, 2007 12:32 PM To: CF-Talk Subject: Help - need to show result only once This query calls a function in the database that gets the sum of the items returned with a category id 9 and a valid transaction number. The problem is that it returns one value for each item in the list of those ordered. What i need is to just show the total once. <cfquery name="qGetCatTotal" datasource="RStore"> select ROL.getusercategoriestotal(#transaction#, 9); </cfquery> Returns this ... qGetCatTotal - query - Top 1 of 1 Rows GETUSERCATEGORIESTOTAL 1 648 648 qGetCatTotal - query - Top 1 of 1 Rows GETUSERCATEGORIESTOTAL 1 648 648 qGetCatTotal - query - Top 1 of 1 Rows GETUSERCATEGORIESTOTAL 1 648 648 qGetCatTotal - query - Top 1 of 1 Rows GETUSERCATEGORIESTOTAL 1 648 648 The 648 is right. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270509 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

