Hi,
I'm trying to run the following code block
Code:
declare
testxml clob;
begin
textxml := '[TABLE]<root><no>1</no></root><root><no>2</no></root>[/TABLE]'
open :csr for
select tt.no
from (
select xmltype.extract (value(a), '/root/no/text()').getstringval() as no
from table (xmlsequence (sys.xmltype(:testxml).Extract('/table1/root'))) a
) tt
group by tt.no ;
end;
The query as written above throws me an error numeric or value error at sys.xmltype (ORA 06502 & ORA 06512). But if I declare the testxml as varchar2; it works fine. Searched quite a bit but to no avail.
The interesting thing is the same query works fine in Oracle SQL developer. Is there any option that I need to set to get this thing working?
Any ideas please!!
THanks.