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

    <i id='b1eFo'><tr id='b1eFo'><dt id='b1eFo'><q id='b1eFo'><span id='b1eFo'><b id='b1eFo'><form id='b1eFo'><ins id='b1eFo'></ins><ul id='b1eFo'></ul><sub id='b1eFo'></sub></form><legend id='b1eFo'></legend><bdo id='b1eFo'><pre id='b1eFo'><center id='b1eFo'></center></pre></bdo></b><th id='b1eFo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='b1eFo'><tfoot id='b1eFo'></tfoot><dl id='b1eFo'><fieldset id='b1eFo'></fieldset></dl></div>
      <bdo id='b1eFo'></bdo><ul id='b1eFo'></ul>
    1. <tfoot id='b1eFo'></tfoot>

    2. <legend id='b1eFo'><style id='b1eFo'><dir id='b1eFo'><q id='b1eFo'></q></dir></style></legend>
    3. <small id='b1eFo'></small><noframes id='b1eFo'>

    4. 在單個(gè)查詢中將多個(gè)節(jié)點(diǎn)插入到 xml 字段

      Insert multiple nodes to xml field in single query(在單個(gè)查詢中將多個(gè)節(jié)點(diǎn)插入到 xml 字段)

        <tbody id='vgraa'></tbody>
      <legend id='vgraa'><style id='vgraa'><dir id='vgraa'><q id='vgraa'></q></dir></style></legend>

        <bdo id='vgraa'></bdo><ul id='vgraa'></ul>

      • <tfoot id='vgraa'></tfoot>
        <i id='vgraa'><tr id='vgraa'><dt id='vgraa'><q id='vgraa'><span id='vgraa'><b id='vgraa'><form id='vgraa'><ins id='vgraa'></ins><ul id='vgraa'></ul><sub id='vgraa'></sub></form><legend id='vgraa'></legend><bdo id='vgraa'><pre id='vgraa'><center id='vgraa'></center></pre></bdo></b><th id='vgraa'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vgraa'><tfoot id='vgraa'></tfoot><dl id='vgraa'><fieldset id='vgraa'></fieldset></dl></div>

            <small id='vgraa'></small><noframes id='vgraa'>

                本文介紹了在單個(gè)查詢中將多個(gè)節(jié)點(diǎn)插入到 xml 字段的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                限時(shí)送ChatGPT賬號..

                我有一個(gè)表(我們稱她為 t),其中包含字段 id(int) 和 XmlField(xml).

                I'm having a table (let's call her t) that contains the fields id(int) and XmlField(xml).

                我嘗試在一個(gè)查詢中添加多個(gè)節(jié)點(diǎn),但無論我嘗試什么,總是出現(xiàn)錯誤.

                I try to add multiple node in one query but no matter what I tried I keep getting errors.

                查詢是:

                update t 
                set XmlField.modify('insert <f1>value here</f1><f2>value there</f2> into (/xmldoc)') 
                

                我收到錯誤:

                XQuery [t.XmlField.modify()]:'' 附近的語法錯誤,預(yù)期為 'as'、'into'、'before' 或 'after'.

                XQuery [t.XmlField.modify()]: Syntax error near '', expected 'as', 'into', 'before' or 'after'.

                當(dāng)我嘗試僅添加一個(gè) xml 節(jié)點(diǎn)時(shí),它正在工作(示例):

                When I trying to add only one xml node it's working (example):

                update t set XmlField.modify('insert <f1>value here</f1> into (/xmldoc)') 
                

                當(dāng)我嘗試添加這樣的嵌套節(jié)點(diǎn)時(shí)它也能正常工作:

                it's also working when I try to add nested nodes like this:

                update t set XmlField.modify('insert <f><f1>value here</f1><f2>value there</f2></f> into (/xmldoc)') 
                

                有什么辦法可以實(shí)現(xiàn)嗎?

                Is there any way to make it happen?

                推薦答案

                SQL Server 文檔確實(shí)很清楚地說明 insert 語句可以處理多個(gè)節(jié)點(diǎn).所以我的猜測是你的問題只是一個(gè)語法錯誤.(Microsoft 語法與 XQuery Update Facility 規(guī)范,但很相似.)

                The SQL Server documentation does say pretty clearly that the insert statement can handle multiple nodes. So my guess is that your problem is just a syntax error. (The Microsoft syntax varies slightly from that defined in the XQuery Update Facility spec, but it's recognizably similar.)

                我會嘗試將元素 f1 和 f2 組合成一個(gè)序列并將它們括在括號中(規(guī)范在這里需要一個(gè) ExprSingle,這意味著不允許使用頂級逗號):

                I'd try making the elements f1 and f2 into a sequence and wrapping them in parentheses (the spec requires an ExprSingle here, which means no top-level commas are allowed):

                update t 
                set XmlField.modify(
                  'insert (<f1>value here</f1>, <f2>value there</f2>) into (/xmldoc)') 
                

                (未針對 SQL Server 進(jìn)行測試.)

                (Not tested against SQL Server.)

                這篇關(guān)于在單個(gè)查詢中將多個(gè)節(jié)點(diǎn)插入到 xml 字段的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                Can I figure out a list of databases and the space used by SQL Server instances without writing SQL queries?(我可以在不編寫 SQL 查詢的情況下找出數(shù)據(jù)庫列表和 SQL Server 實(shí)例使用的空間嗎?) - IT屋-程序員軟件開發(fā)
                How to create a login to a SQL Server instance?(如何創(chuàng)建對 SQL Server 實(shí)例的登錄?)
                How to know the version and edition of SQL Server through registry search(如何通過注冊表搜索知道SQL Server的版本和版本)
                Why do I get a quot;data type conversion errorquot; with ExecuteNonQuery()?(為什么會出現(xiàn)“數(shù)據(jù)類型轉(zhuǎn)換錯誤?使用 ExecuteNonQuery()?)
                How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)
                WinForms application design - moving documents from SQL Server to file storage(WinForms 應(yīng)用程序設(shè)計(jì)——將文檔從 SQL Server 移動到文件存儲)
              1. <small id='pZP9t'></small><noframes id='pZP9t'>

                    1. <tfoot id='pZP9t'></tfoot>
                          <tbody id='pZP9t'></tbody>
                        <i id='pZP9t'><tr id='pZP9t'><dt id='pZP9t'><q id='pZP9t'><span id='pZP9t'><b id='pZP9t'><form id='pZP9t'><ins id='pZP9t'></ins><ul id='pZP9t'></ul><sub id='pZP9t'></sub></form><legend id='pZP9t'></legend><bdo id='pZP9t'><pre id='pZP9t'><center id='pZP9t'></center></pre></bdo></b><th id='pZP9t'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pZP9t'><tfoot id='pZP9t'></tfoot><dl id='pZP9t'><fieldset id='pZP9t'></fieldset></dl></div>
                          <bdo id='pZP9t'></bdo><ul id='pZP9t'></ul>

                          <legend id='pZP9t'><style id='pZP9t'><dir id='pZP9t'><q id='pZP9t'></q></dir></style></legend>
                          主站蜘蛛池模板: 国产一区二区欧美 | 成人久久久 | 成人在线视频免费观看 | 国产成人精品视频在线观看 | 欧美成人一区二免费视频软件 | 欧美性大战xxxxx久久久 | 亚洲精品久久久久中文字幕欢迎你 | 美女午夜影院 | 亚洲天堂影院 | 亚洲国产精品成人综合久久久 | 91日韩| 台湾a级理论片在线观看 | 国产精品入口久久 | 日韩高清成人 | 国产成人综合网 | 欧美中文字幕一区二区三区亚洲 | 国产视频在线观看一区二区三区 | 日韩字幕| 日日干天天操 | avhd101在线成人播放 | 国产美女在线看 | 日韩免费av| 国产乱精品一区二区三区 | 久久国产视频网站 | 中文字幕第7页 | 成人免费在线网 | 成人午夜影院 | 日本中文字幕在线观看 | 男人的天堂在线视频 | 亚洲精品久久久久久一区二区 | 国产成人精品久久二区二区91 | 久久曰视频 | 欧美精品在线一区二区三区 | 国产精品国产a级 | 亚洲视频免费在线播放 | 欧美日韩一卡二卡 | 国产午夜久久久 | 欧美大片一区 | 中文字幕a√ | 国产精品久久久久久久7电影 | 日韩在线第一 |