Brett, It appears your doing some sort of search. Have you looked into the cfindex and cfsearch tags? If this is what your doing, I think you would find these tags useful instead of doing a straight sql query. It also has bonus features like sorting by relevancy which sql doesn't have.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_i_06.html- cfIndex http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_r-s_13.html- cfSearch Paul Alkema http://www.AlkemaDesigns.com On Mon, Oct 26, 2009 at 6:58 PM, Dave Watts <dwa...@figleaf.com> wrote: > > > As it stands it the user enters in the following text as the Search Term: > _a_ the following results are returned: > > cat > > bat > > bar > > kat > > > > Instead of what was really expected like this: > > in_a_boat > > can run_a_mile > > if_a_bird flies > > > > Ok I think you get the picture. It returns any three letter words that > contain an 'a' in the middle position instead of any phrase that > > contains the '_a_' string. However this is not the behavior I would > expect using <cfqueryparam> with the type set to varchar, then > > again maybe this is a case of me just needing to RTFM for both ColdFusion > & T-SQL. > > The underscore character is a metacharacter in SQL when used within a > LIKE clause - it represents any single character. A search clause > "WHERE field LIKE '_a_' will find any three-character value with "a" > as the second character. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > > Fig Leaf Software provides the highest caliber vendor-authorized > instruction at our training centers in Washington DC, Atlanta, > Chicago, Baltimore, Northern Virginia, or on-site at your location. > Visit http://training.figleaf.com/ for more information! > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327814 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4