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

  • <legend id='qMZwO'><style id='qMZwO'><dir id='qMZwO'><q id='qMZwO'></q></dir></style></legend>

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

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

      <tfoot id='qMZwO'></tfoot>

        • <bdo id='qMZwO'></bdo><ul id='qMZwO'></ul>
      1. Oracle XMLTable-從父節(jié)點(diǎn)獲取列

        Oracle XMLTable- fetching column from parent node(Oracle XMLTable-從父節(jié)點(diǎn)獲取列)
            <tbody id='j9p2d'></tbody>
        • <i id='j9p2d'><tr id='j9p2d'><dt id='j9p2d'><q id='j9p2d'><span id='j9p2d'><b id='j9p2d'><form id='j9p2d'><ins id='j9p2d'></ins><ul id='j9p2d'></ul><sub id='j9p2d'></sub></form><legend id='j9p2d'></legend><bdo id='j9p2d'><pre id='j9p2d'><center id='j9p2d'></center></pre></bdo></b><th id='j9p2d'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='j9p2d'><tfoot id='j9p2d'></tfoot><dl id='j9p2d'><fieldset id='j9p2d'></fieldset></dl></div>
        • <tfoot id='j9p2d'></tfoot>

            • <bdo id='j9p2d'></bdo><ul id='j9p2d'></ul>
                1. <small id='j9p2d'></small><noframes id='j9p2d'>

                  <legend id='j9p2d'><style id='j9p2d'><dir id='j9p2d'><q id='j9p2d'></q></dir></style></legend>
                  本文介紹了Oracle XMLTable-從父節(jié)點(diǎn)獲取列的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有以下 XML 結(jié)構(gòu):

                  I have the following XML structure:

                  <root>
                      <parent>
                           <parent_id>1</parent_id>
                           <parent_value>10000</parent_value>
                           <child>
                                <child_id>11</child_id>
                                <other_value>1000</other_value>
                           </child>
                           <child>
                                <child_id>12</child_id>
                                <other_value>1000</other_value>
                           </child>
                      </parent>
                  </root>
                  

                  預(yù)期輸出:

                    CHILD_ID PARENT_VALUE
                  ---------- ------------
                          11 10000            
                          12 10000            
                  

                  我嘗試過的:

                  WITH xtbl AS (SELECT xmltype ('<root>
                                      <parent>
                                           <parent_id>1</parent_id>
                                           <parent_value>10000</parent_value>
                                           <child>
                                                <child_id>11</child_id>
                                                <other_value>1000</other_value>
                                           </child>
                                           <child>
                                                <child_id>12</child_id>
                                                <other_value>1000</other_value>
                                           </child>
                                      </parent>
                                  </root>') AS xcol FROM dual)
                        SELECT myXmlTable.*
                          FROM xtbl
                               CROSS JOIN
                               xmltable ('/root/parent/child'
                                         PASSING xcol
                                         COLUMNS child_id NUMBER (5) PATH 'child_id',
                                                 parent_value NUMBER (10) PATH './parent_value') myXmlTable;
                  

                  我的查詢的問題是 parent_value 為空.請幫忙.

                  Problem with my query is that parent_value comes to be null. Please help.

                  推薦答案

                  您正在尋找./parent_node,它是一個 當(dāng)前 節(jié)點(diǎn).而那是不存在的.

                  You are looking for ./parent_node, which is a <parent_node> under the current <child> node. And that doesn't exist.

                  你只需要提升一個層次:

                  You just need to go up a level:

                  parent_value NUMBER (10) PATH './../parent_value'
                  

                  使用您的 CTE 進(jìn)行演示并添加 ../:

                  Demo with your CTE and just that added ../:

                  WITH xtbl AS (SELECT xmltype ('<root>
                                      <parent>
                                           <parent_id>1</parent_id>
                                           <parent_value>10000</parent_value>
                                           <child>
                                                <child_id>11</child_id>
                                                <other_value>1000</other_value>
                                           </child>
                                           <child>
                                                <child_id>12</child_id>
                                                <other_value>1000</other_value>
                                           </child>
                                      </parent>
                                  </root>') AS xcol FROM dual)
                        SELECT myXmlTable.*
                          FROM xtbl
                               CROSS JOIN
                               xmltable ('/root/parent/child'
                                         PASSING xcol
                                         COLUMNS child_id NUMBER (5) PATH 'child_id',
                                                 parent_value NUMBER (10) PATH './../parent_value') myXmlTable;
                  
                    CHILD_ID PARENT_VALUE
                  ---------- ------------
                          11        10000
                          12        10000
                  

                  這篇關(guān)于Oracle XMLTable-從父節(jié)點(diǎn)獲取列的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Is there a way to get information about a server using SQL(有沒有辦法使用 SQL 獲取有關(guān)服務(wù)器的信息)
                  Select SQL Query to get xml node values from ntext column?(選擇 SQL 查詢以從 ntext 列中獲取 xml 節(jié)點(diǎn)值?)
                  How to get first element by XPath in Oracle(如何在 Oracle 中通過 XPath 獲取第一個元素)
                  Select XML element in SQL Server(在 SQL Server 中選擇 XML 元素)
                  Get followin sibling in SQL Server XPath(在 SQL Server XPath 中獲取跟隨兄弟)
                  SQL FOR XML multilevel from one pivoted table(來自一個透視表的 SQL FOR XML 多級)
                    <bdo id='Toag5'></bdo><ul id='Toag5'></ul>

                        <tbody id='Toag5'></tbody>

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

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

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

                            主站蜘蛛池模板: 亚洲国产一区在线 | 激情 婷婷| 欧美一区二区三区电影 | 国产一区二区麻豆 | 日韩av网址在线观看 | 国产特黄一级 | 国产日韩欧美中文 | 国产在线播放一区二区三区 | av国产精品 | 九九久久精品 | 亚洲精品视频一区 | 国产成人区| 日本午夜一区二区三区 | 成人国产午夜在线观看 | 国产日韩欧美在线播放 | 国外成人在线视频 | 国外成人免费视频 | 在线观看中文字幕视频 | 亚洲网站在线观看 | 特黄特色大片免费视频观看 | 欧美涩 | 天天综合久久网 | 精品国产一区一区二区三亚瑟 | 国产美女黄色片 | 亚洲欧美中文字幕 | 亚洲一区国产 | 亚洲区一区二 | 国产精品亚洲精品 | 国产黄色在线观看 | 91久久国产综合久久91精品网站 | 99视频网| 欧美日韩视频 | 福利视频二区 | 国产第1页 | 亚洲欧美综合 | 成人av看片 | 欧洲性生活视频 | 欧美性猛片aaaaaaa做受 | 午夜精品久久久久久久久久久久 | 在线观看视频一区二区三区 | 亚洲一区二区精品视频 |