Update XML as Upper Case in SQL Server
        Posted  
        
            by monO
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by monO
        
        
        
        Published on 2010-05-07T12:45:24Z
        Indexed on 
            2010/05/07
            12:48 UTC
        
        
        Read the original article
        Hit count: 191
        
I store an XML string in a column in my SQL Server database. I'm trying to run an UPDATE statement that will make a certain field into Upper Case. I can do that easily during a SELECT but can't get it to work with an update.
This SELECT statement works
select Upper(XmlTest.value('(/CodeFiveReport/Owner/@UnitNumber)[1]', 'varchar(10)')) as UnitNumber
from uploadreport
But I want to update it the XML as that permanently
Update table Set XmlString.Modify('replace value of (/Root/Node/@Field)[1] with ?
© Stack Overflow or respective owner