If "The" is the only word causing you problems, look for it at the beginning of the search(it would have to be the beginning as you don't want to take it from the middle of a string) term and remove it before it gets passed to SQL.
Ade -----Original Message----- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 11 November 2005 16:55 To: CF-Talk Subject: Best Practice - Omit "The" and other common words Text Input for Search and another question Let's say I'm searching book titles in a database. I want to find "The Red Tent". However, in the database, it's listed as "Red Tent, The". So: search books where Title like '%#formtitle#%' So, the following will find it: "Red Tent" "Red" "Tent" The exact title "The Red Tent" won't. 1. What's the best way to exclude common words from what's entered in the form field. 2. How would I do something a little more comparitive? Assume the book title is actually "The Big Fat Tent that is Red" and if I enter "Red Tent" into the search field, I'd like it to come up. The only thing I can think of here would be to take each word entered into the form field - "The Red Tent" - put them in a list - "The, Red, Tent" - and then do a search for the terms in the list. Any other ideas? A verity search will NOT work in this case, as there's a ton of other tables with joins and all sorts of other rotten stuff involved... -- ----------- Les Mizzell ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224010 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54