2

我们如何在 SQL 中编写类似于 SSIS 模糊匹配组件的匹配功能?

我们有哪些使用 SQL Server 功能和 SQL 语法的选项?

谢谢,

4

2 回答 2

1

在 T-SQL 中进行模糊匹配的最简单方法是使用SOUNDEX()and DIFFERENCE()

例如

select 
soundex('SQL') as 'four-character (SOUNDEX) code' -- Returns S240
, soundex('Sequel') as 'four-character (SOUNDEX) code' -- Returns S240
, difference('SQL', 'Sequel') as  '0: weak or no similarity. 4: strong similarity or the same values.' -- Returns 4
于 2013-07-26T10:54:39.243 回答
1

您可以使用 SQL Server 的全文索引功能,以及相关的功能CONTAINSRANK等。

于 2013-07-26T10:32:58.257 回答