This content has been marked as final. Show 2 replies
This works for me, what are you doing differently?
NB : using dynamic XQuery is discouraged as it forces functional evaluation (and thus disables optimization).
SQL> declare 2 doc xmltype := xmltype('<root>ABC</root>'); 3 xq varchar2(2000) := '/root'; 4 res varchar2(30); 5 begin 6 select root 7 into res 8 from xmltable(xq passing doc columns root varchar2(30) path '.') 9 ; 10 dbms_output.put_line(res); 11 end; 12 / ABC PL/SQL procedure successfully completed
Let's see ... neither one of you posted a version number ... let's start there.
SELECT * FROM v$version;