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

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

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

      1. 使用 Xquery 在 sql server 中查詢 XML 列表

        querying an XML list in sql server using Xquery(使用 Xquery 在 sql server 中查詢 XML 列表)
        <tfoot id='u0ADK'></tfoot>
      2. <small id='u0ADK'></small><noframes id='u0ADK'>

                <tbody id='u0ADK'></tbody>

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

                  <legend id='u0ADK'><style id='u0ADK'><dir id='u0ADK'><q id='u0ADK'></q></dir></style></legend>
                  本文介紹了使用 Xquery 在 sql server 中查詢 XML 列表的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我在 SQL Server 中有一個表,用于存儲提交的表單數據.每次提交的表單字段都是動態的,因此收集的數據作為名稱值對存儲在名為 [formdata] 的 XML 數據列中,如下例所示...

                  I have a table in SQL server that is used to store submitted form data. The form fields for each submission are dynamic so the collected data is stored as name value pairs in an XML data column called [formdata] as in the example below...

                  這可以很好地收集所需的信息,但我現在需要將這些數據呈現到平面文件或 Excel 文檔中以供工作人員處理,我想知道使用 Xquery 的最佳方法是什么,以便數據可讀嗎?

                  This works fine for collecting the required information but I now need to render this data to a flat file or an excel document for processing by human staff members and im wondering what the best way of doing this would be using Xquery so that the data is readable?

                  表格如下...

                  [id], [user_id], [datestamp], [formdata]
                  

                  以及 formdata 的示例值

                  And a sample value for formdata

                  <formfields>
                    <item>
                      <itemKey>USER_NAME</itemKey>
                      <itemValue>test</itemValue>
                    </item>
                    <item>
                      <itemKey>value2</itemKey>
                      <itemValue>test</itemValue>
                    </item>
                    <item>
                      <itemKey>MYID</itemKey>
                      <itemValue>5468512</itemValue>
                    </item>
                    <item>
                      <itemKey>testcheckbox</itemKey>
                      <itemValue>item1,item3</itemValue>
                    </item>
                    <item>
                      <itemKey>samplevalue</itemKey>
                      <itemValue>item3</itemValue>
                    </item>
                    <item>
                      <itemKey>accept_terms</itemKey>
                      <itemValue>True</itemValue>
                    </item>
                  </formfields>
                  

                  推薦答案

                  這是您想要的嗎?

                  select
                    id,
                    [user_id],
                    datestamp,
                    f.i.value('itemKey[1]', 'varchar(50)') as itemKey,
                    f.i.value('itemValue[1]', 'varchar(50)') as itemValue
                  from YourTable as T
                    cross apply T.formdata.nodes('/formfields/item') as f(i)
                  

                  測試:

                  declare @T table
                  (
                    id int,
                    user_id int,
                    datestamp datetime,
                    formdata xml
                  )
                  
                  insert into @T (id, user_id, datestamp, formdata)
                  values (1, 1, getdate(),
                  '<formfields>
                    <item>
                      <itemKey>USER_NAME</itemKey>
                      <itemValue>test</itemValue>
                    </item>
                    <item>
                      <itemKey>value2</itemKey>
                      <itemValue>test</itemValue>
                    </item>
                    <item>
                      <itemKey>MYID</itemKey>
                      <itemValue>5468512</itemValue>
                    </item>
                    <item>
                      <itemKey>testcheckbox</itemKey>
                      <itemValue>item1,item3</itemValue>
                    </item>
                    <item>
                      <itemKey>samplevalue</itemKey>
                      <itemValue>item3</itemValue>
                    </item>
                    <item>
                      <itemKey>accept_terms</itemKey>
                      <itemValue>True</itemValue>
                    </item>
                  </formfields>
                  '
                  )
                  
                  select
                    id,
                    [user_id],
                    datestamp,
                    f.i.value('itemKey[1]', 'varchar(50)') as itemKey,
                    f.i.value('itemValue[1]', 'varchar(50)') as itemValue
                  from @T as T
                    cross apply T.formdata.nodes('/formfields/item') as f(i)
                  

                  結果:

                  id  user_id  datestamp                itemKey       itemValue
                  1   1        2011-05-23 15:38:55.673  USER_NAME     test
                  1   1        2011-05-23 15:38:55.673  value2        test
                  1   1        2011-05-23 15:38:55.673  MYID          5468512
                  1   1        2011-05-23 15:38:55.673  testcheckbox  item1,item3
                  1   1        2011-05-23 15:38:55.673  samplevalue   item3
                  1   1        2011-05-23 15:38:55.673  accept_terms  True
                  

                  這篇關于使用 Xquery 在 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 移動到文件存儲)

                  <tfoot id='SQFXr'></tfoot>
                • <legend id='SQFXr'><style id='SQFXr'><dir id='SQFXr'><q id='SQFXr'></q></dir></style></legend>

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

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

                            主站蜘蛛池模板: 国产精品免费一区二区 | 久草热8精品视频在线观看 午夜伦4480yy私人影院 | 成人在线免费观看 | 欧美日韩国产一区二区三区 | 精品日韩一区二区 | 97国产精品视频 | 6996成人影院网在线播放 | 日韩免费av | 久久久久久久久淑女av国产精品 | 91久久综合亚洲鲁鲁五月天 | av在线免费网 | 999国产视频 | 久久久这里都是精品 | 国产一级片久久久 | 午夜精品久久久久久久久久久久久 | 亚洲视频免费播放 | 97成人免费 | 看片一区 | 国产一区二区电影 | 日韩精品av一区二区三区 | 日韩精品在线免费观看视频 | 欧美性tv | 日韩欧美高清dvd碟片 | 99久久亚洲 | av手机免费在线观看 | 五月天激情综合网 | 中文成人在线 | 精品久久一区 | 精品国产一区一区二区三亚瑟 | 91干b| 日韩在线免费 | 免费av电影网站 | 成人av免费在线观看 | 一区二区在线 | 羞羞的视频免费看 | 国产精品成人国产乱一区 | 国产亚洲精品美女久久久久久久久久 | 日韩精品免费视频 | 久久免费国产 | 午夜综合| 日韩在线欧美 |