I'm not sure I entirely follow you, but couldn't you ORDER BY lvl DESC to get the MAX lvl as the first record?
Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. t. 250.920.8830 e. [EMAIL PROTECTED] --------------------------------------------------------- Macromedia Associate Partner www.macromedia.com --------------------------------------------------------- Vancouver Island ColdFusion Users Group Founder & Director www.cfug-vancouverisland.com ----- Original Message ----- From: "William H. Bowen" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, July 23, 2002 11:29 AM Subject: Maximum value of column in cfoutput > Hello all, > > I have a column [ lvl ] being returned in a query that is a Count [ > count(child.startbranch) AS lvl ]of another column. I need to be able to > find the MAX of the returned column so that I can write colspans into a > table I am building. > > Is there a way to get *essentially* MAX(lvl) in my cfoutput? > > Desired result: > > A table that builds itself dynamically so the end result will look like this > > td colspan=*max(lvl)* - lvl (here it'll be 0)> 0 level header /td/tr > td> ,/td td colspan=*max(lvl)* - lvl (here it'll be 1)> 1 level subhead > /td/tr > > etc. > > so far the data I need to display is 5 levels deep but that number is > variable with new subs. > > TIA > will > ---- > > William H. Bowen > Webmaster > ALSTOM's T&D Energy Automation & Information Business > > "Your friendly neighborhood Webmaster" > > [EMAIL PROTECTED] > http://www.esca.com/ > > 425.739.3629 Voice > 425.466.7016 Cell > 425.739.3690 FAX > > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

