Hi - I've been struggling with finding or writing text comparison routines in SQL, trying to find a way to compare:

136 W 31st St between 6th & 7th Avenues
-- with --
136 W 31st St

I have to match up venues by address from several different ticket vendors. Tonight I was glad to find this blog post that helped quite a bit to find similar bits or how the strings are different. Saved me a bucket-load of time. Maybe it will help you, too.

[link]
www[dot]simple-talk[dot]com/sql/t-sql-programming/quantifying-text-differences-in-tsql/


[for you fellow coders - a quick example:]
SELECT dbo.ufiDifferencesInText('I piece of text',
'I am a piece of text')
--returns 1
SELECT dbo.ufiDifferencesInText('I am a pot of jam',
'I am a piece of text')
--3
SELECT dbo.ufiDifferencesInText('I am a pot of jam',
'I am a pot of jam beloved by humans')
--3

=============================================
Also, uftShowFirstDifference()
-- Description: A routine that returns a single-row which
-- gives the context of the first difference between two
-- strings
=============================================
SELECT *
FROM dbo.uftShowFirstDifference('I am a pot of jam',
'I am a pot of jam beloved by humans')
-- beloved by humans 13