Che Vilnonis wrote:
> Suppose I have a small set of data with a column named "Colleges". Is there
> a way to write an ORDER BY statement to say something like...
> ORDER BY Colleges 'Harvard', Colleges 'Princeton', Colleges 'Dartmouth'???
>
> Just wondering... Che
If  I understand your question correctly, you want to order a record set 
by first 'Harvard' record(s) then 'Princeton' record(s) and finally 
'Dartmouth' record(s).  If so yes, but you do most of the work in the 
SELECT clause.  Using logic functions in the SELECT clause such as CASE 
you can create dynamically create a sortable column with the appropriate 
values such as Harvard = 1, Princeton = 2 and Dartmouth = 3.  Then you 
just ORDER BY on this dynamic column and you the the result set you desire.

HTH
Because I don't have an example at my finger tips or remember the exact 
syntax off the top of my head to cobble one together this exact second.

Ian


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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297452
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