SQL Server How to add and update element in xml data in table based on match found after search using xquery
-
My objective is to add and update data into xml element which store in table. i am weak in xquery to do it. so looking for help. in my table each row has one field which store xml. suppose my xml data look like below one which store in my table
Consensus Model 2010 FY TRIN Total Sales NO Consensus Model 2011 FY TRIN Total Sales NO
now i have to update XFundCode in all records of xml data if my supplied TabName & StandardLineItem match those records. also i have to add one element called ID=55 to each records if my supplied TabName & StandardLineItem match those records in xml data. so i have two task that i have to add one element called ID = 55 to each records of xml data if my TabName & StandardLineItem found in those records of xml data. also i have to update XFundCode element if my TabName & StandardLineItem found in those records of xml data. Please give me xquery code which i can run in sql server to add & update element in xml data. thanks