data extraction from xmltype [message #664910] |
Fri, 11 August 2017 00:45 |
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';
|
|
|