I have a table include XML column with ntext
data type.
CREATE TABLE #Testing
(
Id int identity,
content ntext
)
INSERT INTO #Testing
VALUES (N'<?xml version="1.0" encoding="UTF-8"?>
<Data <BankAcc><Bankname value="TEST Qərib Bank "/><AccNum value="TEST1221"/></BankAcc>
</Data>')
I want to insert this data <Owner value="Qərib"/>
into existing ntext
data type xml column with code below
update #Testing
set content.modify(N'insert <Owner value="Qərib"/> into (/Data)[1]')
but I get an error:
Msg 258, Level 15, State 1, Line 12
Cannot call methods on ntext
So I try to use cast
update #Testing
set cast(content as varchar(max)).modify(N'insert <Owner value="Qərib"/> into (/Data)[1]')
then I got this error message:
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '('.
Any solution ?