ORA-19025: Extractvalue returns the value of only one node
744273Jan 4 2010 — edited Jan 6 2010Hello,
I am trying to extract the data from an xmltype table where there is possibility of just one node. I am running into ORA-19025 error when there is only one node. Can someone please help me to handle this error when I come across only one node.
Here is my sql:
SELECT
T_ID,
EXTRACTVALUE(value(input_data_b),
'//section[@name="key"]/field[@name="key"]/value') AS KEYS,
EXTRACTVALUE(value(input_data_b),
'//section[@name="key"]/field[@name="averageLength"]/value[1AS BEAD
from METRICS,
table ( xmlsequence
( extract(METRICS_XML,
'//section[@name="regionKey"]/section[@name="key"]')
)
) input_data_b
where 1=1
and T_ID = 1120772614518 --
and EXTRACTVALUE(value(input_data_b), '//section[@name="key"]/field[@name="key"]/value[1]')= 'A'
Thank You
SC