I know that there is a replace value of , but the value of the entire node is replaced.

Is it possible to achieve behavior like a regular Replace MS SQL?

That is, I specify the value that will be replaced by a match, and the non-matching part will remain unchanged.

Or is it necessary to read the value in a variable, call standard SQL Replace, and then stick this value into XML?

  • "you need to read the value in a variable, call standard SQL Replace, and then stick this value into XML" - it seems so. Although the working draft XQuery, which underlies the implementation of the XQuery processor SqlServer and fn:replace present, however, SqlServer supports a rather limited set of string functions. - i-one

0