<cfquery name="your_query">
SELECT *
FROM dates_table,
events_table
WHERE dates_table.EventID = events_table.EventID
</cfquery>
<cfoutput query="your_query" group="EventID">
#EventName#<br>
<cfoutput group="EventDate">
#EventDate#<br>
</cfoutput>
<br>
<br>
</cfoutput>
HTH(?)
> -----Original Message-----
> From: Matt Williams [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 19, 2006 9:35 PM
> To: CF-Talk
> Subject: How to get these query results
>
> So I have 2 tables. Example data and desire results below.
> EventID, EventName
> 1 | TestEventOne
> 2 | TestEventTwo
>
> EventID | EventDates
> 1 | 9/10/2006
> 1 | 9/20/2006
> 2 | 9/15/2006
>
> <!--- Desired results --->
> TestEventOne
> 9/20/2006
> 9/10/2006
>
> TestEventTwo
> 9/15/2006
>
> So basically I want to order by date, but group by the EventID.
> Ordering by date breaks the ability to group by EventID. I know I
> could do this by running a query as I do the output (even a QofQ), but
> was hoping to somehow get the results back in a way to output in this
> manner. Ideas are much appreciated.
>
> --
> 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:253560
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4