Метод типа данных XML «value» должен быть строковым литералом [duplicate]

This question already has an answer here:

The argument 1 of the XML data type method “value” must be a string literal 2 answers

Как изменить мой запрос, чтобы эта ошибка не возникала:

XML data type method “value” must be a string literal

Код T-SQL:

Declare @Count Int = 1 
While(@count <= @j) 
Begin 
insert into mytable 
([Word]) 
Select ([XmlColumn].value(N'word['+Cast(@Count as nvarchar(2))+']/@Entry','nvarchar(max)')) 
    from OtherTable WHERE ID=2

Ответы на вопрос(2)

Ваш ответ на вопрос