Reputation: 1823
I'm trying to convert some XML data coming from a CLOB to a XMLType column.
The XML have some accentuated characters as values (documents are written in french).
Here is what the instruction looks like :
insert into mytable (id, xmldata) values (p_id, xmltype(p_xmldata));
p_id
and p_xmldata
are variables previously extracted from the original table.
I think the french characters prevents XMLType to work correctly. Or maybe malformed XML tags? The problem is, the table holds 3k+ XML documents and only 2 are converted in the XMLType column.
Update: These are the errors I get when I try a simple:
select xmltype(xmldata) from mytable
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.XMLTYPE", line 254
ORA-06512: at line 1
Upvotes: 3
Views: 13933
Reputation: 1823
I used createxml method and now it works fine
insert into mytable (id, xmldata) values (p_id, xmltype.createxml(p_xmldata));
Upvotes: 7