• @dmusick: Interesting approach, and certainly useful. Note that DLD shows the same similarity for 'farm' and 'charm' (40% diff = 60% sim). For performance, I would try to rework your UDF to avoid a local table variable within the UDF. When benchmarking my OpHTML UDF, used in the final SELECT, I noticed that SQL opens transactions for all table variable activity. My Lim UDF, used in the WHERE clause, has better performance because it has no local table variable.