其中,stockView是帶有全文索引的索引視圖,我在下面收到錯誤消息。數據庫在2005兼容模式下運行在2008 Express引擎上。嘗試使用CTE對FREETEXTTABLE索引視圖執行嚴重錯誤
代碼:
with stockCte (title, grade, price, weighted)
as
(
select sv.[title] ,
sv.[grade] ,
sv.[price] ,
(case when sv.[issue] = @issue and svs.[rank] > 30
then svs.[rank] + 100
else svs.[rank]
end) weighted
from stockView sv
inner join freetexttable(stockView, (name), @term) svs
on sv.[id] = svs.[key]
)
select * from stockCte;
錯誤:
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
當我取下內的查詢工作加入和加權列。任何想法,我都不知所措。
我沒有看到任何東西離開我的頭頂。你做這個CTE而不是僅僅使用內部選擇的任何特定原因? – 2009-06-14 16:56:55
內部選擇只是我開始,最終選擇將包括將通過CTE公開的分頁功能。 – kim3er 2009-06-14 17:22:03