0
我試圖通過檢索列作爲參數傳遞給存儲過程,但它從來沒有工作傳遞數據庫列作爲參數包含或FREETEXT
contains(@RTitleColumn, @searchTerm)
我傳遞的@RtitleColumn作爲第一個包含參數
這裏是完整的查詢
SELECT Lid As ItemID, Lhits As Hits, LImageID As ImageID, LNAME As Title
, LCategory AS CategoryID, Lactive AS isActive,LRate AS SumRate,LRAteNo AS CommentCount,
ROW_NUMBER() OVER (ORDER BY LID desc) AS RowRank
FROM dbo.tblRecipes
where
contains(@RTitleColumn, @searchTerm) and (@Activeflag is null or [email protected])
您能否提供'contains' SP的詳細信息? –
@GilPeretz:我很確定OP正在採取'CONTAINS' SQL Server全文搜索命令在這裏... –
嗨,是的,我正在嘗試創建動態SQL並將包含搜索列字段作爲變量,它不接受具有變量,它只接受具有*或實際全文的列名稱,例如「LName」 – Moe9977