Oracle Clob holds complex XML; how to select specific data with Xquery

家住魔仙堡 提交于 2019-12-06 07:59:57

Try it like this:

SELECT 
  XMLType(l.verbose_xml).extract(
  '/Calculation/ProcessUnitModelScenario[@ScenarioId="10053"]')
      FROM air_calc_log l
WHERE l.vld_site_id = 10030 -- pVldSite
       AND l.start_date = To_Date('01/01/2012','mm/dd/yyyy')  -- pStartDate
       AND  l.End_Date = To_Date('04/01/2012','mm/dd/yyyy')

Here is a fiddle (Note that I had to change your XML to make it well-formed)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!