Sort on both.... SELECT a.EventName,b.EventDates FROM Events a INNER JOIN EventsDate b ON a.EventID = b.EventID ORDER BY a.EventName,b.EventDates
Then cfoutout grouping on EventName. Matt Williams wrote: > I'm gonna try this again as while I slept last night my previous post > turned into a discussion of SQL best practices and did not give the > answer needed. But that's probably because I didn't explain well > enough. Ordering by EventID will not work. Nor will ordering by date. > Maybe a little more data will help. > > EventID, EventName > 1 | TestEventOne > 2 | TestEventTwo > 3 | AThirdEvent > > EventID | EventDates > 1 | 9/10/2006 > 1 | 9/20/2006 > 2 | 9/15/2006 > 3 | 9/30/2006 > > <!--- Desired results ---> > AThirdEvent > 9/30/2006 > > TestEventOne > 9/20/2006 > 9/10/2006 > > TestEventTwo > 9/15/2006 > > If you order by EventID, you would get 1, 2, 3. If you ordered by Date > DESC, you would get > 3 > 1 > 2 > 1 > But I want the TestEventOne outputs to be together. GroupBy won't do > it because you've ordered by date. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:253593 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

