Using SQL Server 2012, if I have the following value in one row of an XML type column:
<ArrayOfScheduledJobParameters xmlns="http://schemas.data.org/ScheduledJobServiceLibrary">
<ScheduledJobParameters>
<Key>OutputFileName</Key>
<Value>CPVR{0}.txt</Value>
</ScheduledJobParameters>
<ScheduledJobParameters>
<Key>DaysBeforeExpiration</Key>
<Value>60</Value>
</ScheduledJobParameters>
<ScheduledJobParameters>
<Key>MaxItemsByReportServiceCall</Key>
<Value>100</Value>
</ScheduledJobParameters>
</ArrayOfScheduledJobParameters>
I want to change the value of the element <Value>
based on the value contained in the element <Key>
. Specifically I want to be able to set <Value>
to 150 where the element <Key>
contains the value 'MaxItemsByReportServiceCall'. All that I have been able to do is update the first node of <ScheduledJobParameters>
. I can't find how to do it, if it's even possible in any of the documentation I read on XML DML.