I am attempting to perform an update to an xml column (AttributeList). What my update needs to do is add a leading character (3) to an already existing string (Account_number_1). My code is as follows:
SET accountNumber = '3' + accountNumber,
('replace value of (/AttributeList/Account_number_1/text()) with xs:text("3" + Account_number_1)')
WHERE ClientAccountId = @ClientAccountId
When I attempt to execute the query I receive the following error:
Msg 2214, Level 16, State 1, Procedure ModifyAcctNum, Line 28
XQuery [tbl1.AttributeList.modify()]: The type 'text' is not an atomic type
Can someone please help me with this as I am new to the xquery world and would greatly aapreciate the assistance.