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

      <legend id='f4Ifs'><style id='f4Ifs'><dir id='f4Ifs'><q id='f4Ifs'></q></dir></style></legend>
        <bdo id='f4Ifs'></bdo><ul id='f4Ifs'></ul>

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

    1. <tfoot id='f4Ifs'></tfoot>

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

        SQL Server 生成帶有通用字段元素的 XML

        SQL Server generating XML with generic field elements(SQL Server 生成帶有通用字段元素的 XML)
        <tfoot id='jgovf'></tfoot>
          <tbody id='jgovf'></tbody>
      1. <i id='jgovf'><tr id='jgovf'><dt id='jgovf'><q id='jgovf'><span id='jgovf'><b id='jgovf'><form id='jgovf'><ins id='jgovf'></ins><ul id='jgovf'></ul><sub id='jgovf'></sub></form><legend id='jgovf'></legend><bdo id='jgovf'><pre id='jgovf'><center id='jgovf'></center></pre></bdo></b><th id='jgovf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jgovf'><tfoot id='jgovf'></tfoot><dl id='jgovf'><fieldset id='jgovf'></fieldset></dl></div>
      2. <legend id='jgovf'><style id='jgovf'><dir id='jgovf'><q id='jgovf'></q></dir></style></legend>

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

            • <bdo id='jgovf'></bdo><ul id='jgovf'></ul>

                  本文介紹了SQL Server 生成帶有通用字段元素的 XML的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

                  我基本上是想扭轉(zhuǎn)這個(gè)問題的要求......SQL Server 查詢元素值的 xml 屬性

                  I'm basically trying to reverse what this question is asking... SQL Server query xml attribute for an element value

                  我需要生成一個(gè)row"元素的結(jié)果集,其中包含一組field"元素,其屬性定義了鍵.

                  I need to produce a result set of "row" elements that contain a group of "field" elements with an attribute that defines the key.

                  <resultset statement="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                  <row>
                      <field name="id">1</field>
                      <field name="version">0</field>
                      <field name="property">My Movie</field>
                      <field name="release_date">2012-01-01</field>
                      <field name="territory_code">FR</field>
                      <field name="territory_description">FRANCE</field>
                      <field name="currency_code">EUR</field>
                  </row>
                  <row>
                      <field name="id">2</field>
                      <field name="version">0</field>
                      <field name="property">My Sequel</field>
                      <field name="release_date">2014-03-01</field>
                      <field name="territory_code">UK</field>
                      <field name="territory_description">United Kingdom</field>
                      <field name="currency_code">GBP</field>
                  </row>
                  </resultset>
                  

                  我有一個(gè)查詢返回這個(gè)...

                  I've got a query that returns this...

                  <resultset statement="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                  <row>
                      <id>1</id>
                      <version>0</version>
                      <property>My Movie</property>
                      <release_date>2012-01-01</release_date>
                      <territory_code>FR</territory_code>
                      <territory_description>FRANCE</territory_description>
                      <currency_code>EUR</currency_code>
                  </row>
                  <row>
                      <id>2</id>
                      <version>0</version>
                      <property>My Sequel</property>
                      <release_date>2014-03-01</release_date>
                      <territory_code>UK</territory_code>
                      <territory_description>UNITED KINGDOM</territory_description>
                      <currency_code>GBP</currency_code>
                  </row>
                  </resultset>
                  

                  在我的 SQL 語句中使用 FOR XML PATH ('row'), ROOT ('resultset').

                  Using FOR XML PATH ('row'), ROOT ('resultset') in my SQL statement.

                  我錯(cuò)過了什么?謝謝.

                  推薦答案

                  它有點(diǎn)涉及 SQL Server - 正常行為就是您所看到的 - 列名稱將用作 XML 元素名稱.

                  It's a bit involved in SQL Server - the normal behavior is what you're seeing - the column names will be used as XML element names.

                  如果您真的希望所有 XML 元素都具有相同的名稱,則必須使用如下代碼:

                  If you really want all XML elements to be named the same, you'll have to use code something like this:

                  SELECT
                      'id' AS 'field/@name',
                      id AS 'field',
                      '',
                      'version' AS 'field/@name',
                      version AS 'field',
                      '',
                      'property' AS 'field/@name',
                      property AS 'field',
                      '',
                      ... and so on ....
                  FROM Person.Person
                  FOR XML PATH('row'),ROOT('resultset')
                  

                  這是必要的,以確保將列名用作 元素上的 name 屬性,并且需要空字符串,以便 SQLXML 解析器不會混淆哪個(gè) name 屬性屬于哪個(gè)元素......

                  This is necessary to make sure the column name is used as the name attribute on the <field> element, and the empty string are necessary so that the SQL XML parser doesn't get confused about which name attribute belongs to what element......

                  這篇關(guān)于SQL Server 生成帶有通用字段元素的 XML的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guā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 實(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)換錯(cuò)誤?使用 ExecuteNonQuery()?)
                  How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)
                  • <i id='qMZqn'><tr id='qMZqn'><dt id='qMZqn'><q id='qMZqn'><span id='qMZqn'><b id='qMZqn'><form id='qMZqn'><ins id='qMZqn'></ins><ul id='qMZqn'></ul><sub id='qMZqn'></sub></form><legend id='qMZqn'></legend><bdo id='qMZqn'><pre id='qMZqn'><center id='qMZqn'></center></pre></bdo></b><th id='qMZqn'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qMZqn'><tfoot id='qMZqn'></tfoot><dl id='qMZqn'><fieldset id='qMZqn'></fieldset></dl></div>

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

                        <legend id='qMZqn'><style id='qMZqn'><dir id='qMZqn'><q id='qMZqn'></q></dir></style></legend>

                        <tfoot id='qMZqn'></tfoot>
                            <tbody id='qMZqn'></tbody>
                            <bdo id='qMZqn'></bdo><ul id='qMZqn'></ul>
                            主站蜘蛛池模板: 久久区二区 | 啪啪免费 | 国产一区二区三区四区五区3d | 国产色 | 一区二区精品在线 | 久久久www成人免费无遮挡大片 | 精品久久久久久久人人人人传媒 | 国产精品中文字幕在线播放 | 欧美日韩免费在线 | 青青99| 99精品视频一区二区三区 | 亚洲3p| 久久99精品久久 | 在线中文字幕第一页 | 久国产视频 | 欧美一级在线观看 | 日韩在线电影 | 99精品视频在线观看 | 亚洲精品成人 | 午夜无码国产理论在线 | a级片在线观看 | 亚洲不卡视频 | 国产精品一级 | 欧美成年网站 | 国产精品成人一区 | 亚洲毛片一区二区 | 亚洲精品视频在线 | 亚洲欧美视频一区二区 | 国产精品99久久久久久久vr | 日韩欧美在线播放 | 亚洲一区国产精品 | 亚洲欧美日韩电影 | 久草精品视频 | 一级电影免费看 | 国外成人在线视频 | 亚洲成人av | 狠狠操狠狠操 | 一级片免费视频 | 欧美一区二区三区在线观看 | 免费激情 | 免费观看国产视频在线 |