I need the name of the element is also a variable (is a parameter of the procedure)
Instead of this, which works fine:
DECLARE @VAR VARCHAR(5)
SET @VAR = 'false'
UPDATE CURVES
SET CURVEENTITY.modify(
'replace value of (/ElementName/text())[1] with sql:variable("@VAR")')
WHERE ID = 3
But I would like something like this:
DECLARE @VAR VARCHAR(5)
DECLARE @VAR2 VARCHAR(20)
SET @VAR = 'false'
SET @VAR2 = 'ElementName'
UPDATE CURVES
SET CURVEENTITY.modify(
'replace value of (/sql:variable("@VAR2")/text())[1] with sql:variable("@VAR")')
WHERE ID = 3
But it does not work! How can I do this?