I'm a couple of days late, but you can simply do this:

ArrayMax(queryname["ColumnName"])


Thanks to Ray Camden for showing this trick in another list posting, even
though it was using a different array function on a query.  Note, you cannot
do ArrayMax(queryname.ColumnName), but it DOES work if you use array
notation as above.

-Andy

> -----Original Message-----
> From: William H. Bowen [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 2:30 PM
> To: CF-Talk
> 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
>
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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

Reply via email to