Yes, thanks I did one more group output and used maxrows and it worked fine.

Thanks

Shawn Regan
pacifictechnologysolutions
15530-B Rockfield Blvd. Suite 4 
Irvine, CA 92618
949.830.1623
w w w . p t s 1 . c o m



-----Original Message-----
From: Rick Root [mailto:rroot@;wakeinternet.com]
Sent: Thursday, November 14, 2002 10:46 AM
To: CF-Talk
Subject: Re: Requery of a query in CF 4.5?


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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to