I am using SQL Server to create a query(update statement)
The update statement is against a data type of text.
Within the text is xml data.
Here is what I need to do.
I have some 3000 records that sometimes the xml tag is there and soemtimes its not.
I need to be able to add about 5 xml tags to each row in this field called msettings.
If the tag inside of msettings exists I need to be able to either override it or keep it the same. It would be nice to construct the query so that could be optional depending on the situation.
And then ofcourse if the tag does not exist I would want it to append to the xml. I do not think order matters as these are just tags...so its more like metadata
set msettings =
where something = something
Please help...im not sure if I should be doing xpath...or some other logic.
I was hoping to make a robust solution as I could see reusing this later