> 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:327714
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