久久久久久久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)
主站蜘蛛池模板: 色天天综合网 | 美女久久久久 | 亚洲精品久久久久久久久久久 | 插插插av | 91日韩欧美 | 亚洲第一天堂网 | 欧美a级成人淫片免费看 | 久草网在线观看 | 国产三级在线观看视频 | 最新超碰| 精产国产伦理一二三区 | 国产精品第一区 | 国产成人精品免费视频 | 国产一级一片免费播放放a 男男成人高潮片免费网站 精品视频在线观看 | 亚洲理论片 | 极品在线视频 | 久久天堂av| 一级黄色录像带 | 天堂av影院 | 欧美精品一二三区 | 亚洲一区二区欧美 | av一区二区三区四区 | 久久黄色 | 91麻豆精品视频 | 黄色片小视频 | 日本一级一片免费视频 | 自拍偷拍福利视频 | 一区在线观看 | 欧美日韩精品在线 | 人人艹人人 | 91欧美大片 | 国产精品一区二区三区不卡 | 日韩中文字幕精品 | 亚洲福利精品 | 日本不卡在线播放 | 黄色影视大全 | 特级黄色大片 | 国产美女毛片 | 黄色免费一级片 | 99婷婷| 亚洲成人毛片 |