I am trying to update an existing XML column value in SQL Server.
declare @xml xml;
select @xml =
'<items xmlns:dt="urn:schemas-microsoft-com:datatypes">
<item dt:dt="string">Item1<item>
</items>';
set @xml.modify('insert <item dt:dt="string">Item2</item> into (/items)[1]');
This throws the error: XQuery [modify()]: The namespace prefix 'dt' has not been defined
How can I get the namespace in to the modify?