How to extract repeatable json node values separately from XML using ORACLE SQL?

后端 未结 2 1167
暗喜
暗喜 2021-01-29 00:51

I have the following XML and i want to extract the values of json parameter \"serviceNumber\" separately i tried using EXTRACT function but i got the results co

2条回答
  •  感动是毒
    2021-01-29 01:12

    Try XMLTABLE

    select * from xmltable(XMLNAMESPACES( 'http://www.ibm.com/xmlns/prod/2009/jsonx' as "json") , '//json:string[@name eq "serviceNumber"]' passing xmltype({your_xml_here})
     columns serviceNumber varchar2(100) path '.' 
     )
    

提交回复
热议问题