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

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

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

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

    2. 如何在 SQL Server 2008 中讀取 XML 列?

      How to read XML column in SQL Server 2008?(如何在 SQL Server 2008 中讀取 XML 列?)
          <i id='wPVog'><tr id='wPVog'><dt id='wPVog'><q id='wPVog'><span id='wPVog'><b id='wPVog'><form id='wPVog'><ins id='wPVog'></ins><ul id='wPVog'></ul><sub id='wPVog'></sub></form><legend id='wPVog'></legend><bdo id='wPVog'><pre id='wPVog'><center id='wPVog'></center></pre></bdo></b><th id='wPVog'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wPVog'><tfoot id='wPVog'></tfoot><dl id='wPVog'><fieldset id='wPVog'></fieldset></dl></div>
            <tbody id='wPVog'></tbody>
          • <bdo id='wPVog'></bdo><ul id='wPVog'></ul>

            <tfoot id='wPVog'></tfoot>

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

              <legend id='wPVog'><style id='wPVog'><dir id='wPVog'><q id='wPVog'></q></dir></style></legend>
                本文介紹了如何在 SQL Server 2008 中讀取 XML 列?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我從未在 SQL Server 2008 中使用過 XML,我需要將一個字段列表提取到一個變量表中,你怎么做?

                I have never used XML in SQL Server 2008, I need to extract a list of fields into a variable table how do you do it?

                鑒于我在 XMLMain 表中有一個名為 xmldata 的列,它看起來像下面這樣,如何提取 sql 中的字段列表?

                Given that I have a column called xmldata in a XMLMain table that looks like something like below how do I extract the list of fields in sql?

                ![在此處輸入圖片說明][1]

                ![enter image description here][1]

                <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:SampleForm:-myXSD-2014-03-29T09-41-23" solutionVersion="1.0.0.18" productVersion="15.0.0.0" PIVersion="1.0.0.0" href="http://bipc20/sites/team-1303/FormServerTemplates/SampleForm.xsn"?>
                <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.4"?>
                <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2014-03-29T09:41:23" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-US">
                <my:field1>1</my:field1>
                <my:field2>2</my:field2>
                <my:field3>true</my:field3>
                <my:field4 xsi:nil="true" />
                <my:field5 xsi:nil="true" />
                <my:field6>4</my:field6>
                <my:FormName>2014-04-01T15:11:47</my:FormName>
                <my:Repeating>hi</my:Repeating>
                <my:Repeating xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2014-03-29T09:41:23">hello</my:Repeating>
                <my:Repeating xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2014-03-29T09:41:23">how are  you?</my:Repeating>
                </my:myFields>
                

                我想以逗號分隔的形式提取重復字段的值,例如 ex.在重復中,我們有三個值(你好,你好嗎?)

                I want to extract value of Repeating field as comma separated like for ex. in Repeating we have three values (hello,how are you?)

                有人可以幫我嗎?

                推薦答案

                with xmlnamespaces('http://schemas.microsoft.com/office/infopath/2003/myXSD/2014-03-29T09:41:23' as my)
                select M.XMLData.value('(/my:myFields/my:field1/text())[1]', 'int') as field1,
                       M.XMLData.value('(/my:myFields/my:field2/text())[1]', 'int') as field2,
                       M.XMLData.value('(/my:myFields/my:field3/text())[1]', 'bit') as field3,
                       M.XMLData.value('(/my:myFields/my:FormName/text())[1]', 'datetime') as FormName,
                       (
                         select ','+R.X.value('text()[1]', 'nvarchar(max)')
                         from M.XMLData.nodes('/my:myFields/my:Repeating') as R(X)
                         for xml path(''), type
                       ).value('substring(text()[1], 2)', 'nvarchar(max)') as Repeating
                from XMLMain as M
                

                結果:

                field1      field2      field3 FormName                Repeating
                ----------- ----------- ------ ----------------------- -----------------------
                1           2           1      2014-04-01 15:11:47.000 hi,hello,how are  you?
                

                這篇關于如何在 SQL Server 2008 中讀取 XML 列?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關文檔推薦

                SQL query to get all products, categories and meta data woocommerce/wordpress(獲取所有產(chǎn)品、類別和元數(shù)據(jù)的 SQL 查詢 woocommerce/wordpress)
                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 實例使用的空間嗎?) - IT屋-程序員軟件開發(fā)
                How to create a login to a SQL Server instance?(如何創(chuàng)建對 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()?(為什么會出現(xiàn)“數(shù)據(jù)類型轉(zhuǎn)換錯誤?使用 ExecuteNonQuery()?)
                How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)
                  <tbody id='5MdLu'></tbody>

                  <legend id='5MdLu'><style id='5MdLu'><dir id='5MdLu'><q id='5MdLu'></q></dir></style></legend>
                        <bdo id='5MdLu'></bdo><ul id='5MdLu'></ul>
                        <tfoot id='5MdLu'></tfoot>

                        <small id='5MdLu'></small><noframes id='5MdLu'>

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

                        • 主站蜘蛛池模板: 午夜精品久久久久久不卡欧美一级 | 性在线 | 欧美久久电影 | 欧美一区二区三区大片 | 夜夜久久 | 91免费电影 | 久久久久久亚洲精品 | 中文字幕人成乱码在线观看 | 午夜三级视频 | 成人欧美一区二区三区白人 | 日韩欧美不卡 | 亚洲高清一区二区三区 | 一级午夜aaa免费看三区 | 午夜理伦三级理论三级在线观看 | 日本三级电影在线看 | 欧美综合国产精品久久丁香 | 91五月婷蜜桃综合 | 一区二区三区免费看 | 亚洲欧美视频 | 天堂一区在线观看 | 国产精品久久久久久久久久免费看 | 久久久不卡网国产精品一区 | 一区二区三区免费 | 日韩二| 国产人成精品一区二区三 | 成人国产免费视频 | 国产91在线播放 | 色资源在线 | 天天艹日日干 | 午夜激情在线视频 | 久久久91精品国产一区二区三区 | 欧美成人h版在线观看 | 精品福利一区二区三区 | 欧美电影大全 | 国产精品成人久久久久a级 久久蜜桃av一区二区天堂 | 亚洲欧美在线一区 | 午夜精品久久 | 日韩一区二区黄色片 | 午夜免费视频 | 日韩免费网站 | 国产精品永久在线观看 |