Если stockView - это индексированное представление с полнотекстовым индексом, я получаю сообщение об ошибке ниже. База данных работает на движке 2008 Express в режиме совместимости 2005 года.
Код:
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.
Запрос работает, когда я удаляю внутреннее соединение и взвешенный столбец. Любые идеи, я в растерянности.