We have a winner!  Charlie!

Solution:

<cfquery name="get_results" datasource="#application.dsn#">
                                        
        select     t.name, t.date, t.time,
                  s.firstname, s.lastname, s.state, s.nsca,
                  r.con, r.class, r.shot, r.broke
        from       tournaments t, shooters s, registrations r
        where      r.shooter_id = s.shooter_id
        and        r.tournament_id = t.tournament_id
        and        t.tournament_id = <cfqueryparam cfsqltype="integer" 
value="#url.tournament_id#">
        order by        
        case       class
        when       'AAA'     then 10
        when       'AA'      then 20
        when       'A'       then 30
        when       'B'       then 40
        when       'C'       then 50
        when       'D'       then 60
        when       'E'       then 70
        when       'F'       then 80
        when       'G'       then 90
        when       'H'       then 100
        when       'I'       then 110
        when       'J'       then 120
        when       'K'       then 130
        end        , r.broke desc
                                                
</cfquery>

Thanks, Charlie and everyone!

Rick

> -----Original Message-----
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 26, 2008 2:12 PM
> To: CF-Talk
> Subject: Re: Here's an interesting little problem...
> 
> ORDER BY
>     CASE class
>         WHEN 'AA' THEN 10
>         WHEN 'A' THEN 20
>         WHEN 'B' THEN 30
>         WHEN 'C' THEN 40
>         WHEN 'D' THEN 50
>         WHEN 'E' THEN 60
>     END
> 
> incremented by 10 so you can add 'AAA' etc later :)
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311616
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to