Ciao a tutti, dovrei fare un update in un campo XML di una tabella.
Dovrei praticamente sostituire una stringa con un altro valore
Ecco la struttura XML:
<property name="items">
<name>items</name>
<type>itemseditor</type>
<label>Items</label>
<value>PIPPO</value>
<description>Edit Items</description>
</property>
Dovrei sostituire PIPPO con 'PLUTO'
Ecco la query che uso per leggere il valore del tag "value":
SELECT
XML_FIELD.value('(property[@name="items"]/value)[1]', 'nvarchar(1000)')
FROM [TABELLA_XML]
Ho provato a fare questa query ma ho il seguente problema:
XQuery [XML_FIELD.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(value,xdt:untyped) ?'
GRAZIE MILLE !!!!