i have a text XML with more than 100K Characters , I am trying to write a PLSQL Block to insert this XML into an XMLTYPE Oracle Table. Below is my PLSQL Block and it wont allow to insert the xml and getting error saying string literal is too long because Oracle's SQL can only handle up to 4000 characters . I cannot change the datatype in Oracle. How i can insert this XML ?
Table Column is REQUEST_XML XMLTYPE
I was trying like this but it seems that also not working.
INSERT INTO XYZ.ABC(ID,REQUEST_XML) values(123,yourXmlStr);
PLSQL is below,
DECLARE
yourXmlStr xmltype := xmltype('<DRIVEResponse TimeZone="EDT">
<Condition1 ActionStep="ABCABC" /> // This can be more than 100K Characters
</DRIVEResponse>');
BEGIN
INSERT INTO XYZ.ABC(ID,REQUEST_XML) values(123,XMLTYPE.CREATEXML(yourXmlStr));
COMMIT;
END;