.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

What is the difference between Soundex and Difference() function in Sql Server?

Posted By: Deco     Posted Date: October 11, 2010    Points:2   Category :Sql Server
Please give me the exact difference, for me it sounds like both are same...

Responses
Author: Sajid P K             
Posted Date: October 12, 2010     Points: 5   

Dear,

Follwing link may be the best resouece to clear your dobut.


http://msdn.microsoft.com/en-us/library/ms189282.aspx



Regards,
Sajid P K

Author: Asha.MP             
Posted Date: October 12, 2010     Points: 5   

HI...

SoundEX will return 4 letters code, this is used to compare two strings. for example
SELECT SOUNDEX ('cat'), SOUNDEX ('dog')
will return
C300 D200

DIFFERENCE finction will return 0 to 4, 4 indicates the best match.
SELECT DIFFERENCE('principal', 'principle') is 4, because those strings are almost similar, But a query looking at the difference between the words cat and dog shows a different result:
SELECT DIFFERENCE('cat', 'dog')is 2, not a best match

Thanks and Regards,
Asha.mp


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend