SQL Language (MOSC)

MOSC Banner

Find parent node name for all the multiple child nodes using XMLTABLE in Oracle

edited January 2024 in SQL Language (MOSC) Question

We have a table named XML_TEST which contains XML as `XMLTYPE`.

XML sample and its structure is as below,


  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

  <invoice>

    <AR_ITEMS elem="2">

   <SERVICE_OBJ>0.0.0.1 /service/telco/gsm/telephony 44745735656 0</SERVICE_OBJ>

   <ITEM_NO>B1-730869289,5</ITEM_NO>

   <NAME>Cycle forward</NAME>

   <ITEM_TOTAL>637.5</ITEM_TOTAL>

   <DUE_T>1676408400</DUE_T>

   <DUE>637.5</DUE>

   <DISPUTED>0</DISPUTED>

   <EVENT_POID_LIST></EVENT_POID_LIST>

   <ACCOUNT_OBJ>0.0.0.1 /account 44709279566 22</ACCOUNT_OBJ>

   <BILLINFO_OBJ>0.0.0.1 /billinfo 44709278926 0</BILLINFO_OBJ>

   <AR_BILLINFO_OBJ>0.0.0.1 /billinfo 44709278926 0</AR_BILLINFO_OBJ>

   <BILL_OBJ>0.0.0.1 /bill 48486806027 0</BILL_OBJ>

   <EFFECTIVE_T>1673730000</EFFECTIVE_T>

   <CREATED_T>1673732390</CREATED_T>

   <ITEM_OBJ>0.0.0.1 /item/cycle_forward 340795877581277892 1</ITEM_OBJ>

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center