我有一个包含大量行的表(名称:错误)。该表的某些行显示如下:
202 16 Invalid type '%s' for WAITFOR. Supported data types are CHAR/VARCHAR, NCHAR/NVARCHAR, and DATETIME. WAITFOR DELAY supports the INT and SMALLINT data types.
203 16 The name '%.*ls' is not a valid identifier.
204 20 Normalization error in node %ls.
205 16 All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
206 16 Operand type clash: %ls is incompatible with %ls
207 16 Invalid column name '%.*ls'.
而不是像'%。* ls'这样的字符串,可以使用不同的单词。例如,我有一个这样的字符串:
Invalid column name 'test'.
我想在Microsoft SQL Server 2012中使用全文搜索来查找错误表中最相似的字符串(无效的列名称' test'。)我使用下面的查询,但此查询不返回任何输出
SELECT *
FROM errors AS A
INNER JOIN
CONTAINSTABLE(errors , text, 'ISABOUT ("Invalid column name ''text''")',
LANGUAGE N'English',10) AS K
ON A.text = K.[KEY]
任何想法?