Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to extract a value from sql column-xml clob data

sql enthusiastNov 11 2015 — edited Nov 19 2015

Hi Guys,

I need some help with the following. I have a column whose data is of xml type (clob data). I need to extract the information in <RI4> tag and also from <RI6> tag.
I have truncated the data but there is a repetition of <RI4> tag and consequenty internal to that of RI6 tag. However each RI4 and RI6 tag has different data.

I would appreciate if you can help me with that:

<a xsi:schemaLocation="som location.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:somlocation">

  <b>Some stuff here</b>

  <c>

  <someinfo>blah</someinfo>

  <someinfo2>blah2</someinfo2>

  </c>

  <EffectiveDateTime>2015-10-01T00:00:00+10:00</EffectiveDateTime>

  <CurrencyCode>AUD</CurrencyCode>

  <RequiredInformation>

  <RequiredInformation2>

  <RequiredInformation3>

  <RI4>someinfo</RI4>

  <RI5>

  <RI6>

  <a1>1</a1>

  <b1>9.13</b1>

  </RI6>

  <RI6>

  <a1>2</a1>

  <b1>8.75</b1>

  </RI6>

  <RI6>

  <a1>3</a1>

  <b1>78.90</b1>

  </RI6>

  <RI6>

  <a1>4</a1>

  <b1>200</b1>

  </RI6>

  <RI6>

  <a1>5</a1>

  <b1>17.59</b1>

  </RI6>

  </RI5>

  </RequiredInformation3>

  </RequiredInformation2>

  </RequiredInformation>

  </a>

I gather that since it involves the repetition I might need to do some sort of PL/SQL programming but I definitely need some help here to build that ad also a way to extract the information.

Any help would be greatly appreciated.

Regards,

This post has been answered by Karthick2003 on Nov 11 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2015
Added on Nov 11 2015
27 comments
23,324 views