Difference function in SQL Server
What is Difference function in SQL Server?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Oct 31, 2012, 8:05 PM EDT
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