Home » Developer & Programmer » JDeveloper, Java & XML » data extraction from xmltype (Oracle 11g)
data extraction from xmltype [message #664910] Fri, 11 August 2017 00:45 Go to previous message
Rengaprabhu
Messages: 18
Registered: August 2002
Junior Member
Hi Friends,

I am trying to extract data from xmltype , i managed to extract for normal text attributes.
There is one set of data with Table model, the path i am specifying is wrong. Pls correct me.

<table>
<name>mainSuppliersTable</name>
<row>
<text>
<name>suppliersname</name>
<value>kjbsdfhb</value>
</text>
<text>
<name>supplierslocation</name>
<value>bdbvjsdb</value>
</text>
</row>
<row>
<text>
<name>suppliersname</name>
<value>bvjhfvh</value>
</text>
<text>
<name>supplierslocation</name>
<value>bnjfdbjd</value>
</text>
</row>
</table>

My code which is not working.

select a.form_nbr, x.*
from sample a,
xmltable ('/form/table/name'
PASSING a.data_xml
columns
a varchar2(4000) PATH '/row/text/name',
b varchar2(4000) path './row/value'
) x
where a.form_nbr='2017491'
and a ='suppliersname';
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: unload the data from the Oracle database into xml, using java.
Next Topic: Oracle11g
Goto Forum:
  


Current Time: Fri Apr 26 04:27:47 CDT 2024