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