I'm not sure soundex is what you want to use here.  Soundex is for searching 
for words that sound alike but may be spelled differently, ie searching for a 
person named "Smyth" and you search for "Smith".

You are doing more of a keyword type search so the like operator in your query 
may be more suitable.  However, I think your best solution may be to utilize 
SQL Server's full-text search engine to create an index on the relevant field 
in the database.

Steve


-----Original Message-----
From: James Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2008 6:57 AM
To: CF-Talk
Subject: SOUNDEX() in MSSQL

Does any one know how to use MSSQL's SOUNDEX() functionality to get
good search results?

Lets say I am doing a product search by title, if the title in the DB
is "Blade Runner (DVD)" and someone searches for "Blade Runner" then

WHERE SOUNDEX(title) = SOUNDEX(#form.title#)

will work just fine but if someone searched for "the blade runner"
then the query would fail since SOUNDEX() only works on the first
word.

--
Jay



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

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