Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: XMLQuery select gives "PLS-00801: internal error"
Gerry Atric wrote:
> I take it this means Oracle does not do implicit casting between xmltype and
> varchar2? I don't see why this is not possible... an implicit cast could
> just copy the xmltype stuctured data into a varchar2 (or clob).
>
> The version is Oracle 10gR2 Standard running on RHAS4.
>
> ---------------------
>
> "Error(71,2): PLS-00801: internal error [*** ASSERT at file pdw4.c, line
> 793; Cannot coerce between type 43 and type 30;"
>
> --------------------
>
> procedure xmltest as
>
> xmldata xmltype := xmltype('<packet><data>some data</data></packet>');
> xmlresult varchar2(4000);
>
> begin
>
> select xmlquery('for $a in $doc/packet/data return <data>{$a}</data>'
> passing xmldata as "doc" returning content) into xmlresult from dual;
>
> end;
>
> -------------------
No it does not. You have to call the getstringval method on it.
xmldata.getstringval(); Received on Sun Mar 26 2006 - 13:14:07 CST