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

      <bdo id='HZL03'></bdo><ul id='HZL03'></ul>
    <tfoot id='HZL03'></tfoot>

  1. <legend id='HZL03'><style id='HZL03'><dir id='HZL03'><q id='HZL03'></q></dir></style></legend>
    1. <small id='HZL03'></small><noframes id='HZL03'>

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

      如何使用 sql server 在 XML 文檔中獲取包含具有給定

      How do you get a node that contains a child node with a given attribute value in an XML document using sql server?(如何使用 sql server 在 XML 文檔中獲取包含具有給定屬性值的子節點的節點?) - IT屋-程序員軟件開發技

        1. <tfoot id='XET8O'></tfoot><legend id='XET8O'><style id='XET8O'><dir id='XET8O'><q id='XET8O'></q></dir></style></legend>

            <bdo id='XET8O'></bdo><ul id='XET8O'></ul>
          • <small id='XET8O'></small><noframes id='XET8O'>

            <i id='XET8O'><tr id='XET8O'><dt id='XET8O'><q id='XET8O'><span id='XET8O'><b id='XET8O'><form id='XET8O'><ins id='XET8O'></ins><ul id='XET8O'></ul><sub id='XET8O'></sub></form><legend id='XET8O'></legend><bdo id='XET8O'><pre id='XET8O'><center id='XET8O'></center></pre></bdo></b><th id='XET8O'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XET8O'><tfoot id='XET8O'></tfoot><dl id='XET8O'><fieldset id='XET8O'></fieldset></dl></div>
                <tbody id='XET8O'></tbody>
                本文介紹了如何使用 sql server 在 XML 文檔中獲取包含具有給定屬性值的子節點的節點?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我正在使用 SQL Server 2008 解析 XML 文檔.我是一個完整的菜鳥,我想知道我是否可以從你們那里得到幫助.

                I'm working on parsing XML documents using SQL Server 2008. I'm a complete noob and I was wondering if I can get help from you guys.

                我有一個像下面這樣的 XML 文檔,我想獲取代碼"節點具有 val=5 的部分"節點.

                I have an XML document like the one below and I want to get the "section" node where the "code" node has val=5.

                <root>
                  <section>
                    <code val=6 />
                    ...
                  </section>
                  <section>
                    <code val=5 />
                    ...
                  </section>
                  <section>
                    <code val=4 />
                    ...
                  </section>
                </root>
                

                所以結果應該是:<代碼><節><代碼val=5/>...</section>

                我試過這樣做,但沒有用:

                I tried doing this, but it didn't work:

                select @xml.query('/root/section')其中@xml.value('/root/section/code/@val,'int')='5'

                我也試過這個:select @xml.query('/root/section')其中@xml.exist('/root[1]/section[1]/code[@val="1"])='1'

                有什么想法嗎?提前致謝.

                Any ideas? Thanks in advance.

                推薦答案

                你可以使用這個查詢:

                DECLARE @x XML=N'
                <root>
                  <section atr="A">
                    <code val="5" />
                  </section>
                  <section atr="B">
                    <code val="6" />
                  </section>
                  <section atr="C">
                    <code val="5" />
                  </section>
                </root>';
                
                SELECT  a.b.query('.') AS SectionAsXmlElement,
                        a.b.value('@atr','NVARCHAR(50)') AS SectionAtr
                FROM    @x.nodes('/root/section[code/@val="5"]') a(b);
                

                結果:

                SectionAsXmlElement                         SectionAtr
                ------------------------------------------- ----------
                <section atr="A"><code val="5" /></section> A
                <section atr="C"><code val="5" /></section> C
                

                這篇關于如何使用 sql server 在 XML 文檔中獲取包含具有給定屬性值的子節點的節點?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                Can I figure out a list of databases and the space used by SQL Server instances without writing SQL queries?(我可以在不編寫 SQL 查詢的情況下找出數據庫列表和 SQL Server 實例使用的空間嗎?) - IT屋-程序員軟件開發
                How to create a login to a SQL Server instance?(如何創建對 SQL Server 實例的登錄?)
                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()?(為什么會出現“數據類型轉換錯誤?使用 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 應用程序設計——將文檔從 SQL Server 移動到文件存儲)

                    <tbody id='t5yVJ'></tbody>

                    <tfoot id='t5yVJ'></tfoot>

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

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

                      <legend id='t5yVJ'><style id='t5yVJ'><dir id='t5yVJ'><q id='t5yVJ'></q></dir></style></legend>
                        1. 主站蜘蛛池模板: 日本三级电影在线免费观看 | 欧美日韩精选 | 精品久久久久一区二区国产 | 中文字幕av亚洲精品一部二部 | 99综合 | 欧美成人h版在线观看 | www.精品国产 | 日本a∨精品中文字幕在线 亚洲91视频 | 日韩福利在线 | 激情综合五月 | 国产一区二区精品在线观看 | 天天看天天操 | 九九热国产精品视频 | 99精品欧美一区二区三区 | 久久免费视频观看 | 一区二区三区不卡视频 | 午夜欧美 | 国产在线精品一区二区三区 | 久久综合狠狠综合久久 | 激情久久网| 成人网av| 日韩欧美国产一区二区三区 | 天天射色综合 | 国产中文字幕亚洲 | 色婷婷久久久久swag精品 | 欧美高清性xxxxhdvideosex | 国产精品观看 | 亚洲欧美v| 免费久久视频 | 91视频在线网站 | 久久伊人久久 | 日韩欧美精品 | 欧美自拍日韩 | 亚洲成人精品一区 | 色av一区二区三区 | 免费观看一级毛片 | 久久99这里只有精品 | 黄视频网站在线 | 免费看国产精品视频 | 国产91一区二区三区 | 国产三级精品视频 |