久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

將數據插入到 ntext xml 列(無法調用 ntext 錯誤的方

Inserting data to ntext xml column (Cannot call methods on ntext error)(將數據插入到 ntext xml 列(無法調用 ntext 錯誤的方法))
本文介紹了將數據插入到 ntext xml 列(無法調用 ntext 錯誤的方法)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個包含 ntext 數據類型的 XML 列的表.

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>')

我想將此數據 插入到現有的ntext 數據類型xml 列中,代碼如下

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]')

但我收到一個錯誤:

消息 258,級別 15,狀態 1,第 12 行
無法在 ntext 上調用方法

Msg 258, Level 15, State 1, Line 12
Cannot call methods on ntext

所以我嘗試使用演員

update #Testing
 set cast(content as varchar(max)).modify(N'insert <Owner value="Q?rib"/> into (/Data)[1]')

然后我收到此錯誤消息:

then I got this error message:

消息 102,級別 15,狀態 1,第 12 行
'(' 附近的語法不正確.

Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '('.

有什么解決辦法嗎?

推薦答案

將您的數據類型轉換為 nvarchar(max)、varchar(max) 或 varbinary(max)

convert your data type to nvarchar(max), varchar(max) or varbinary(max)

重要!ntext、text 和 image 數據類型將在 SQL Server 的未來版本中刪除.避免在新的開發工作中使用這些數據類型,并計劃修改當前使用它們的應用程序.請改用 nvarchar(max)、varchar(max) 和 varbinary(max).

IMPORTANT! ntext, text, and image data types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

參考

如果它是正確的 xml,那么 XML 數據類型將最適合

If it is proper xml then XML data type will fit best

這篇關于將數據插入到 ntext xml 列(無法調用 ntext 錯誤的方法)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Modify Existing decimal places info(修改現有小數位信息)
The correlation name #39;CONVERT#39; is specified multiple times(多次指定相關名稱“CONVERT)
T-SQL left join not returning null columns(T-SQL 左連接不返回空列)
remove duplicates from comma or pipeline operator string(從逗號或管道運算符字符串中刪除重復項)
Change an iterative query to a relational set-based query(將迭代查詢更改為基于關系集的查詢)
concatenate a zero onto sql server select value shows 4 digits still and not 5(將零連接到 sql server 選擇值仍然顯示 4 位而不是 5)
主站蜘蛛池模板: 亚洲欧美在线一区 | 久久天堂 | 日韩欧美国产一区二区三区 | 久久久精| 国产一区二区在线免费观看 | 精品在线看 | 在线视频日韩 | 婷婷久久综合 | 欧美激情国产精品 | 亚洲www.| 视频在线一区二区 | 日韩国产一区二区 | 久久艹免费视频 | 99精品一区二区 | 中文字幕一区二区三区四区五区 | 久久亚洲欧美日韩精品专区 | 亚洲一区国产精品 | 五月激情六月婷婷 | 99久久成人 | 一区免费 | av一区在线观看 | 精品一区二区三区四区五区 | 国产精品免费看 | 国产一区二区三区免费视频 | 国产视频一区二区 | 免费观看一级特黄欧美大片 | 一区二区三区在线 | 51ⅴ精品国产91久久久久久 | 国产亚洲一区二区三区在线观看 | 精品国产乱码久久久久久牛牛 | 欧美日韩高清免费 | 国产乱码精品1区2区3区 | 91夜色在线观看 | 国产乱码精品一区二区三区五月婷 | 超碰97干| 精品一区二区电影 | 精品亚洲一区二区三区 | 粉嫩国产精品一区二区在线观看 | 久久久久久美女 | 国产97久久 | 天天操一操 |