On 9/20/06, Kris Jones <[EMAIL PROTECTED]> wrote: > You need to order by both, first the item on which you want to group, > then the item that you want sorted within that group. I've used a left > outer join just incase you have events that do not have dates entered. > > Hopefully, I've not flubbed this up, and this works for you: > > <cfquery name="myevents" datasource="mydsn"> > select e.eventname, d.eventdates > from event e left outer join eventdates d on e.eventid=d.eventid > order by e.eventname, d.eventdate desc > </cfquery> > > <cfoutput query="myevents" group="eventname"> > <p> > #eventname# > <cfoutput><br />#dateformat(eventdates,"mm/dd/yyyy")#</cfoutput> > </p> > </cfoutput> > > Cheers, > Kris >
Kris, yes, the dates will be grouped with the events in your example, but the overall results will not be sorted by date descending, which is the desired result. -- Matt Williams "It's the question that drives us." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253607 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

