Jim... nice work.. I am not overly familiar with using the Select in the order by column but it works great in MS-SQL as you say (MS Access doesn't seem to like it ! )
On 9/20/06, Jim Wright <[EMAIL PROTECTED]> wrote: > Matt Williams wrote: > > Rich, you are right in that I want the event with the furthest/newest > > date to show first. But if there is another date associated with that > > newest event, it should also show under its title. Your solution looks > > like it will work. I'll give it a try and let you know. > > > > I am hoping to find a "bit more clever" solution too as this is > > actually an OO-style app where I hope to have a CFC return the query > > results for me. I suppose I could just build a new query with QueryNew > > instead of the output as you show. > > > This could be done with a subquery in the ORDER BY... > > SELECT a.EventName,b.EventDates > FROM Events a INNER JOIN EventsDate b ON a.EventID = b.EventID > ORDER BY (SELECT max(eventdates) FROM EventsDate WHERE eventid = > a.eventid) DESC,a.EventName,b.EventDates DESC > > (at least in MS-SQL...not sure of support in others) > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:253693 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

