This worked. Thanks. H.
> -----Original Message----- > From: Charlie Griefer [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 5:32 PM > To: CF-Talk > Subject: Re: finding max value after query > > ----- 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

