Is there an alternative way to skip node elements dynamically than the one shown below ??
select XMLTable.XMLCOL.query('//*[local-name()=sql:variable("@node")')
For example, even if I try to give the full path, I donβt want to hardcode the node elements, instead I would like to pass them separately as parameters.
In chapter -
Example: query Using sp_executesql
@ http://msdn.microsoft.com/en-us/library/ms345118(v=sql.90).aspx
He says -
contains templates (*) and node using node names and it is difficult to optimize well. Therefore, it is much worse than the original query and the query construction approach.
source share