Shawn Regan wrote:
> I have a query that I run which is dumping out in a grouped query. But I
> have one group that I need to only display the most recent recordset, but
> the other two groups need to display all recordsets. SO I cannot apply my
> logic in the SQL because it would affect all three groups.

So do it programmatically on your output... You could try using 
MAXROWS="1" on the INNER <CFOUTPUT> statement.  If that doesn't work, 
simply do this.

<CFOUTPUT QUERY="foo" GROUP="bar">
  some stuff
  <CFSET DISPLAYED_ONE_ALREADY = FALSE>
  <CFOUTPUT>
    <CFIF somecriteria OR NOT DISPLAYED_ONE_ALREADY>
      output the row
     </CFIF>
  </CFOUTPUT>
</CFOUTPUT>

You would use "somecriteria" to have it display all rows for certain 
groupings.

  - Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
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

Reply via email to