In the previous post we see how to insert the XML file data into the database. In this post we can see how to update the xml data.
Read Here:
Storing the XML file into the table
https://bageshkumarbagi-msbi.blogspot.com/2021/07/storing-xml-file-into-table.html
Lest see. We want to update the highlighted record into the file and want to update those records in the table.
Updating the data in the file.
Updating the
records based on the SearchKeyword.
Script to
update this record.
UPDATE Xml_File_Details SET XMLData = ( SELECT XMLData FROM ( SELECT CONVERT(XML, XMLCol, 0) FROM OPENROWSET (BULK 'H:\SSIS1\Source\XML_Files\Computer.Xml', SINGLE_BLOB) AS XMLSource (XMLCol) ) AS XMLData (XMLData) ) WHERE SearchKeyword = 'Computer' |
Record
updated successfully.
See the
record in the table.
Record
updated successfully.
No comments:
Post a Comment
If you have any doubt, please let me know.