I have the following XML column in my Oracle 11 G DB:
<?xml version="1.0" encoding="UTF-8"?>
<l-analysis version="2.9">
<vehicle>
<odo-reading latest="true">
<reading value="653463">653,463</reading>
<reading-date value="2018-12-04">4-Dec-2018</reading-date>
<reading-unit code="K">Km</reading-unit>
</odo-reading>
<odo-reading latest="false">
<reading value="391264">393,264</reading>
<reading-date value="2018-12-04">4-Dec-2018</reading-date>
<reading-unit code="K">Km</reading-unit>
</odo-reading>
</vehicle>
</l-analysis>
I need to query the reading value
but only where odo-reading latest="true"
.
How can I do that in a CLOB
column?
Best Answer
Answer to the original question before it was edited: