I have a database with an XML column. I am trying to update (trim) an xml value of the xml column. I am running on Windows, SQL Server 2008 Express.
I did not find any way to trim directly in Xquery so I tried by selecting the value. Here is the SQL
select RTRIM(LTRIM(col2.value('(/Root/Row/Rowid/text())[1]','varchar(20)')))
from dbo.T1
But now I am not getting how to update this xml value.
Is there any way to Trim the xml value directly? If not how can I Trim the value?
I am not trying to update the single row in the table, I am trying to trim the xml value of all the rows in the table