May 5, 2009 at 9:49 am
I am not sure how to update existing data in an xml field when we add elements and remove them. for example
We need to remove "PT" from the schema. there is existing data out there that needs to be updated. How do I update the xml field to remove that portion. also say in the future we add an element how do I add the element?
thanks
May 5, 2009 at 12:07 pm
As per BOL as well as Jacob Sebastians great Book "The Art of XSD" there is no way to remove an element from a stored schema using T-SQL. The only way to alter the specific schema is to drop it an re-create it without the element in question. For details please see BOL, section "DDL for Managing XML Schema Collections in the Database".
To add/modify/remove elements/attributes in question from existing XML data, please see BOL under "XML Data Modification Language (XML DML)".
If you have trouble modifying the sample code to meet your requirements please show what you've done and what you're struggling with.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply