Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 problem with soundex

Author  Topic 

jmartin357
Starting Member

2 Posts

Posted - 2002-12-02 : 17:05:09
Greetings. I'm using sql server 2k to hold some names and
addresses which I allow people to search using soundex
values of the names. that all works great for me, except
I have one glaring problem: I don't think sql server is
calculating soundex values correctly. I use a function
that I got from some vb help site that will calculate sx
values which I then pass to sql server. So consider this
example: soundex('Scroggins') returns S262 in sql server,
but my function returns S625. I would assume that my
function is wrong, except that just for fun I tested that
in Oracle, which happily returned S625, agreeing with my
function and disagreeing with sql server. Has anyone ever
seen this and is there a solution that doens't involve me
hard coding soundex values in the table or writing my own
sql function to do it?

Thanks
-Jim Martin

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2002-12-02 : 17:08:19
Try this

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=13574

Go to Top of Page

baldeep
Starting Member

18 Posts

Posted - 2002-12-02 : 17:47:08
There are several different SoundEx implementations. SQL Server and Oracle may very well be implementing different variants... Here's an article that might help:

http://www.codeproject.com/csharp/SoundEx.asp

--Baldeep

Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-12-02 : 21:55:48
There is also a better soundex function in the Guru's Guide to Transact SQL which is available in the store.

Damian
Go to Top of Page
   

- Advertisement -