On 9/20/06, Jim Wright <[EMAIL PROTECTED]> wrote:
> 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)
>

Jim, this seemed to work. I have never tried a subquery in an order
by. I was trying to get the results with a subquery, but in the where
statement. Thanks for this idea.

-- 
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:253612
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to