Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-19025: Extractvalue returns the value of only one node

744273Jan 4 2010 — edited Jan 6 2010
Hello,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2010
Added on Jan 4 2010
2 comments
2,524 views