I have some XML data in a SQL Server database that I want to edit. However it appears to be marked as read only if I just try to click in the field and manually edit it. How should I go about editing the values?
It appears that you are trying to edit this through SSMS - you can't do it through that. (I believe that XML fields cannot be edited in SSMS as it isn't set up to do the necessary validation, and MS didn't want people doing edits and getting errors.)
However, if you use another client, such as MS Access, to edit the table/view data, you will probably find that it can be edited.
Alternatively, you could copy the XML, and paste it into an: UPDATE TableOrViewName SET FieldName = 'Your modified XML Here' WHERE PKField = PKValue statement in a new query window. You wouldn't want to do this manually for any more than a few records.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With