----- Original Message ----- From: "Owens, Howard" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 6:23 PM Subject: finding max value after query
> I have a query that returns, potentially, several hundred records. There is > a column that can contain a value between 1 and 12 (though not necessarily > 12). > > I'm trying to find a function or some method that will tell me what that MAX > value was. I know I could get the information via query, but I'd rather not > run a separate query to get this value. > > I could, I supposed, use valuelist() to make the query a list and then get > the last element of that list (which, since this is an ordered column, would > be the highest value), but that seem decidedly inefficient. > Assuming that the query is, as you say, ordered by that particular column... <cfoutput>#queryName.columnName[queryName.recordCount]#</cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

