About the value values in the Replace XML file in the database (SQL Server)

Source: Internet
Author: User

DECLARE @xmlDoc XML
declare @PrintValue nvarchar (max)

Select@xmlDoc =description fromDbo. Wf_persist_descriptorwhere[process_id]='1e9e9059-50ea-adac-4660-918cd54e3436'--the data in the data is read out, the database error is nvarchar (max) here can be directly converted

Set@xmlDoc. Modify ('Replace value of (/process/activities/activity[@key = "N8"]/name/text ()) [1] with "Gome Online coo"')--Replace the value below a node. Text () is the text value of the Read node store

UPDATE dbo. Wf_persist_descriptorSetDescription=convert (nvarchar (max), @xmldoc)where[process_id]='1e9e9059-50ea-adac-4660-918cd54e3436'
Set@[email protected] ('(/process/activities/activity[@key = "N8"]/name) [1]','nvarchar (MAX)')
Print @PrintValue

About the value values in the Replace XML file in the database (SQL Server)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.