0
我使用全文搜索在SQL Server中,我有这样一个查询:全文搜索多列获得其列匹配
SELECT [Column 12] AS Column_12 ,
[Column 0] AS Column_0 ,
[Column 13] AS Column_13 ,
[Column 3] AS Column_3 ,
[Column 4] AS Column_4 ,
[Column 14] AS Column_14 ,
[Column 5] AS Column_5 ,
[Column 2] AS Column_2
FROM dbo.allCountries
WHERE CONTAINS (([Column 12], [Column 0], [Column 13], [Column 3],
[Column 4], [Column 14], [Column 5], [Column 2]), @Location)
我需要的是让这列匹配搜索值。如果搜索匹配多个列,我需要获取他们的名称或索引。
即使没有FullText,你所要求的在你有的结构中是不可能的......你将需要UnPivot列到一个Multi-Join样式表中,并从中获得你需要的信息 – GoldBishop