When I execute this statement query in Oracle 11g Database:
select *
from XMLTABLE('/dept/employee/phone' PASSING XMLTYPE.createXML(('
<dept bldg="114">
<employee id="903">
<name>
<first>Sachin</first>
<last>Fulari</last>
</name>
<office>CTS</office>
<phone>9158500222</phone>
<phone>9028044722</phone>
<salary currency="CHF">64000</salary>
</employee>
</dept>')) COLUMNS
first VARCHAR(25) PATH '../name/first',
last VARCHAR(25) PATH '../name/last',
phone VARCHAR(12) PATH '.'
) AS e
I get following error :
ORA-19110: unsupported XQuery expression
Output expected is :
FIRST LAST PHONE SALARY
------ ---- ---------- -------
Sachin Fulari 9158500222 64000
Sachin Fulari 9028044722 64000