• I manage a largish custom corporate CRM system, built specifically for our needs.

    We used to use SOUNDEX for the first few years, as it was what SQL Server offered for name searching. But, as the contact database grew, and the call centers moved offshore, we needed a batter name matching systems. In the end we have implemented two CLR functions

    * NYSIIS - which is an encoder similar to SOUNDEX, but more modern, and does a better job of the sound of names

    * LevenshteinDistance - which compares who strings, and gives you the number of differences (missing chars, added chars, transposed chars etc)

    For our contacts database, we cache the NYSIIS values for last_name and first_name + ' ' + last_name. When we search for a name, we do the NYSIIS function on the search expression, we do a direct compare from the cached values to the search NYSIIS result, and return the results. So users can search for last_name, last_name, first name or first_name last_name.

    Note. NYSIIS arranged each encoded word alphabetically after doing the algorithm.

    We then default sort the results by the LevenshteinDistance of the real names, theory being the user spelt it right, so the name is at the top, but the names get progressively different down the list.

    We are transitioning to EF5 at the moment, and all this worked seamlessly as a EF function, which was nice. performance is as good as soundex - as we are cached, but the results are far superior.

    There are other algorithms out there, some much better ones if you want to match Dutch names, but NYSIIS proved ideal for our set of names.