My Oracle Support Banner

Unexpected Row Returned in by EXTRACTVALUE When NONE is Expected (Doc ID 1563298.1)

Last updated on MARCH 28, 2019

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.


The following query with extractvalue  returns a weird result in when it would be
not expected to get any result at all.

The query is:

select 'QUERY0 : expected ''No rows returned'' ',
     extractvalue(value (xml_data), '/Telephone') Telephone
TABLE (xmlsequence (extract (XMLTYPE(q''<MMIT_Data_Record>
      <Telephone Is_Active="false"/>
     , '//Communication/Telephone' ))) xml_data
WHERE  extractvalue(value (xml_data),'/Telephone') is not NULL;

------------------------------------ ---------
QUERY0 : expected 'No rows returned'


In and the result is correct and as expected it is :

no rows selected


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.