tag:blogger.com,1999:blog-2070562064795774675.post9164000867491372871..comments2024-02-08T12:48:59.805-08:00Comments on Levenshtein distance in Microsoft Sql Server: How it is done...Tom Van Schoorhttp://www.blogger.com/profile/11769270322940002685noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-2070562064795774675.post-30831991445115128122022-03-03T15:24:13.692-08:002022-03-03T15:24:13.692-08:00This comment has been removed by a blog administrator.fabremaahshttps://www.blogger.com/profile/13817497066722388911noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-34212313143441539362020-05-13T09:04:12.685-07:002020-05-13T09:04:12.685-07:00absolutely amazing! thx soo much for sharingabsolutely amazing! thx soo much for sharingAnonymoushttps://www.blogger.com/profile/05802749424054178648noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-42302645575355554842016-05-28T06:27:57.217-07:002016-05-28T06:27:57.217-07:00Hi, your code has been very helpful to my database...Hi, your code has been very helpful to my database queries.<br />I would like to know if there is a way of running this levenshtein function using for example:<br /><br />SELECT aColumn<br />FROM aTable<br />WHERE dbo.fn_Levenshtein(aColumn, (select bColumn from bTable)) > 80<br /><br />in this case returning only results that meet at least a match percentage with at least one of the values in bColumn.Anonymoushttps://www.blogger.com/profile/08375830740504316967noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-12684120727521926142014-05-07T18:34:16.092-07:002014-05-07T18:34:16.092-07:00Go to C:\Windows\Microsoft.NET\Framework64 and loo...Go to C:\Windows\Microsoft.NET\Framework64 and look for other versions of .NET, then try compiling using the csc.exe of each version, I was able to make it work using v3.5JPhttps://www.blogger.com/profile/09752848753918398712noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-72463466599923788042014-05-07T18:31:26.101-07:002014-05-07T18:31:26.101-07:00This comment has been removed by the author.JPhttps://www.blogger.com/profile/09752848753918398712noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-64573827799212368892013-11-27T12:43:20.385-08:002013-11-27T12:43:20.385-08:00Any ideas on how to get this to work on SQL Server...Any ideas on how to get this to work on SQL Server 2008 R2 Standard Edition? I've tried the above but get the following errors:<br /><br />CREATE ASSEMBLY for assembly 'UserFunctions' failed because the assembly is built for an unsupported version of the Common Language Runtime. (.Net SqlClient Data Provider)Anonymoushttps://www.blogger.com/profile/05212022217005837147noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-44368714717265684812013-08-10T04:48:38.954-07:002013-08-10T04:48:38.954-07:00Excellent Tom,
How could you improve it with a &q...Excellent Tom,<br /><br />How could you improve it with a "Max Distance Parameter" as third argument?<br />It could save a lot of time in some cases.Murtahttps://www.blogger.com/profile/12809918070987220840noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-58691027498767699042013-07-29T07:02:24.693-07:002013-07-29T07:02:24.693-07:00Great stuff. Exactly what I needed when I moved th...Great stuff. Exactly what I needed when I moved the backend of an MS Access application over SQL Server and broke a couple of my UDFs (Levenshtein was one). Had forgotten all about the ability to use custom assemblies.Anonymoushttps://www.blogger.com/profile/11286249443414912541noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-13894088112943000372012-09-11T23:29:06.342-07:002012-09-11T23:29:06.342-07:00Excellent post :)
Need to Enabling CLR Integrati...Excellent post :) <br /><br />Need to Enabling CLR Integration before we are able to run the custom function but excellent. Nicely described.Prateek Bhargavahttps://www.blogger.com/profile/00426841980529954889noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-11963378619592622542012-08-20T21:52:32.617-07:002012-08-20T21:52:32.617-07:00Hi there,
Well for example:
DECLARE @inputString...Hi there,<br /><br />Well for example:<br /><br />DECLARE @inputString VARCHAR(50)<br /><br />SET @inputString = 'My Search'<br /><br />SELECT aColumn<br />FROM aTable<br />WHERE dbo.fn_Levenshtein(aColumn, @inputString) > 80<br /><br />Would return all fuzzy matches that resemble for 80 or more percent according to Levenshtein distance.<br /><br />Cheers!Tom Van Schoorhttps://www.blogger.com/profile/11769270322940002685noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-38020663970814299392012-08-01T16:24:09.535-07:002012-08-01T16:24:09.535-07:00Hi can you please give an example of how to use th...Hi can you please give an example of how to use this is SQL or .Net to return text/strings which are a fuzzy match of the input stringUnknownhttps://www.blogger.com/profile/01239343911508512548noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-89572765579598975542011-10-25T03:27:25.339-07:002011-10-25T03:27:25.339-07:00Hi Tom
I found this post when i was googling leve...Hi Tom<br /><br />I found this post when i was googling levenshtein, and it helps a lot. <br /><br />Thanks.<br /><br />xjAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-2032215402035434512011-04-22T04:36:05.057-07:002011-04-22T04:36:05.057-07:00Thanks Brent, your response is much appreciated.
A...Thanks Brent, your response is much appreciated.<br />And a fast comment too :) the post isn't even finished yet.<br />I have obligations today to take my loving wife out so I'll probably finish up the post tomorrow.<br /><br />Cheers!Tom Van Schoorhttps://www.blogger.com/profile/11769270322940002685noreply@blogger.comtag:blogger.com,1999:blog-2070562064795774675.post-34601204728272448712011-04-21T23:45:24.945-07:002011-04-21T23:45:24.945-07:00I appreciate this post, Tom, if for no other reaso...I appreciate this post, Tom, if for no other reason than to remind us all to leverage the power of .NET in our SQL server instances wherever possible (instead of trying to deal with the limitations of SQL and it's often wacky overhead).<br /><br />Good work!Brent Bullahttps://www.blogger.com/profile/07573093406890272965noreply@blogger.com