select SOUNDEX('ram')
WILL RETURN 'R500'
Is there a way to input 'R500' and return 'ram'
something like this
select reverse_of_SOUNDEX('R500')
RESULT
--------
ram
select SOUNDEX('ram')
WILL RETURN 'R500'
Is there a way to input 'R500' and return 'ram'
something like this
select reverse_of_SOUNDEX('R500')
RESULT
--------
ram
You have the same problem as you would have for trying to reverse any many-to-one mapping function.
While
ram
may be one word that gives you the soundex coder500
, so do a large number of other words (ran, rim, run, rune, rain and so on, depending on which variant of soundex you're using).So which word would you like to see displayed in that case?
One possibility, if you're after a list of words, would be to populate a table with a large number of words (from a dictionary somewhere) along with their soundex codes. The codes can be set, after insertion of the words, quite easily with:
and then you can simply do:
or: