SELECT Part.Id
FROM Part INNER JOIN
(SELECT t.value(’.’,‘nvarchar(200)’) as Token FROM :Tokens.nodes(’/tokens/token’) AS tokens(t)) TokensTable
ON Part.Description LIKE ‘%’ + TokensTable.Token + ‘%’
I think it’s objecting to the XML logic but I have no idea why.
The SQL is perfectly valid - will it still execute even though validation fails?
Seems I can work around the error by copying the XML parameters into a local variable and then using that. This allows it to execute but it still won’t validate.
So there are two problems here. Firstly the parameter system can’t cope with a parameter which doesn’t have a space after it, such as “:Tokens.nodes”. Secondly there’s still a spurious validation error in the schema modeller.