sqlitesoundex

SQLite soundex string length


Does soundex function in sqlite has limitation on string length? As I found that the result of

SELECT soundex('Schneider Thomson'), soundex('Schneider Rene'), soundex('Schneider')

Are all the same value which equal S536, However the result of :

SELECT soundex('Schn Thomson'), soundex('Schn Rene'), soundex('Schn');

Is different for each string and the values is

soundex('Schn Thomson') = S535 
soundex('Schn Rene')    = S565
soundex('Schn')         = S500

Please can any one explain why?


Solution

  • The Soundex algorithm is desgined to work on single words. (To simplify, it encodes the first letter and the first three following consonants.)