Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can any one provide me a SOUNDEX like SQL function working correctly for INDIAN NAMES?

i need to search indian names from my database (mysql). i tried SOUNDEX function but it fails for long indian names.

like image 230
AD. Avatar asked May 12 '11 10:05

AD.


People also ask

How SOUNDEX works in SQL?

SOUNDEX converts an alphanumeric string to a four-character code that is based on how the string sounds when spoken in English. The first character of the code is the first character of character_expression, converted to upper case.

What is SOUNDEX in MySQL?

SOUNDEX() function in MySQL is used to return a phonetic representation of a string. The phonetic represents the way the string will sound. The SOUNDEX function helps to compare words that are spelled differently, but sound alike in English. Syntax : SOUNDEX(str)

What is SOUNDEX value?

Description. The SOUNDEX function evaluates expression and returns the most significant letter in the input string followed by a phonetic code. Characters that are not alphabetic are ignored. If expression evaluates to the null value, null is returned.


1 Answers

I would suggest using the Double Metaphone algorithm for MySQL in this instance. Double Metaphone is designed to handle the difficulties associated with words from different root languages. It is based upon Metaphone, which was designed to correct some of the deficiencies of Soundex. Here is a link to the Double Metaphone site where you can learn more about it and also see examples in multiple languages including MySQL:

http://www.atomodo.com/code/double-metaphone

like image 144
IAmTimCorey Avatar answered Oct 07 '22 22:10

IAmTimCorey