I am trying to implement the following code.
declare @para varchar(10) = 'b'; declare @x xml = ' <x> <a>1111</a> <b>2222</b> <c>3333</c> </x>'; select @x.query('/x/sql:variable("@para")');
The above code should get node from <b>2222</b> . However, it gets the following error:
Msg 9335, Level 16, State 1, Line 8
XQuery [query ()]: The XQuery syntax '/ function ()' is not supported.
source share