Difference function in SQL Server
What is Difference function in SQL Server?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Nov 1, 2012, 12:05 AM
SOUNDEX converts an alphanumeric string to a four-character code to find similar-sounding words or names. The first character of the code is the first character of character_expression and the 2nd to 4th characters of the code are numbers that represent the letters in the expression.
DIFFERENCE function returns an integer value.It value range is 0 to 4.The integer returned is the number of characters in the SOUNDEX values that are the same.it indicates weak or no similarity, and 4 indicates strong similarity or the same values.
SELECT SOUNDEX('myCode'), SOUNDEX('myCodee'), DIFFERENCE('myCode','myCode');
--out put M230,M230,4
SELECT SOUNDEX('KyCode'), SOUNDEX('myCode'), DIFFERENCE('myCode','KyCode');
--out put K230,M230,3
Pls refer
http://msdn.microsoft.com/en-us/library/ms188753.aspx
http://www.dotnetspider.com/resources/36569-Difference-function-SQL-Server.aspx