Reputation: 26981
If I wanted to run a query where certain fields in my query were to be mispelt (up to a certain point of course), is there a native way to do this with MS SQL server or does one have to implement something else entirely? What I think it boils to is can you select where levenstein distance is a max of X
Example
select from myTable WHERE name closeTo('Erik')
and it might return things like Eric, ie, a Levenhstein distance of 1
Upvotes: 1
Views: 1163
Reputation: 10780
Have a look at T-SQL SOUNDEX and DIFFERENCE: http://msdn.microsoft.com/en-us/library/ms187384.aspx
Upvotes: 2