Modify xml element name in SQL Server

Posted by sesame on Stack Overflow See other posts from Stack Overflow or by sesame
Published on 2009-05-20T04:04:06Z Indexed on 2010/04/06 20:03 UTC
Read the original article Hit count: 315

Filed under:
|
|

I want to change element name with following statement:

SET @myDoc.modify('replace value of (/CustomerInfo)[1] with "Customer"')   

from
<CustomerInfo>
    <ID>1</ID>
</CustomerInfo>
to
<Customer>
    <ID>1</ID>
</Customer>
But failed. So how can i change it just in sql ?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about sql