Getting 'The argument 1 of the xml data type method "modify" must be a string literal' while inserti

Posted by sam on Stack Overflow See other posts from Stack Overflow or by sam
Published on 2010-04-13T08:24:49Z Indexed on 2010/04/13 9:22 UTC
Read the original article Hit count: 412

Filed under:
|
|

Trying the following code. But getting 'The argument 1 of the xml data type method "modify" must be a string literal' error. searched alot but cant find any solution for this problem

SET @Path = '/@ParentNodeName/@NodeName/child::*'
SET @x.modify('insert attribute status {sql:variable("@status")}
               as first into (' + @Path + ')[1]')

© Stack Overflow or respective owner

Related posts about Xml

Related posts about tsql