I think the best solution would be to have the title in two columns:
Prefix and TheRest (or some better name). Then create a view with the
readable title: prefix + ' ' + TheRest AS FullTitle and the sortable
title: TheRest + ', ' + prefix AS SortTitle.



> -----Original Message-----
> From: Candace Cottrell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 9 January 2003 12:49 p.m.
> To: CF-Talk
> Subject: ORDER BY Clause and parsing
> 
> 
> Good evening...
> 
> I am trying to order a list of books by their Title.
> However, many of the books begin witht the word "The" or "A" or "An".
> 
> Is there an easy way to go through and say...
> 
> <cfset actualTitle = query.Title minus A,An, or The>
> 
>  then the SQL...
> 
> Select Title
> >From Books
> Order By #ActualTitle#
> 
> Would I need to go through and do a left of the string Title 
> 
> <cfset leftVal = Left(query.Title, 3)>
> <cfif leftVal IS "the">
> <cfset actualTitle = query.title - LeftVal>
> 
> 
> Does this make sense??? I just dont think I'm "getting it".
> 
> 
> TIA :)
> 
> 
> Candace K. Cottrell, Web Developer 
> The Children's Medical Center 
> One Children's Plaza 
> Dayton, OH 45404 
> 937-641-4293 
> http://www.childrensdayton.org
> 
>  
> [EMAIL PROTECTED]
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to