I have an XML that has to be inserted in production DB. A row got accidentally deleted due to which a batch job has failed to run. So, I need to insert an XML. I have this XML in test region schema.
I tried to convert XML from varchar2 to clob, but was not possible. I was then told to convert XML from varchar2 to XMLType and then to CLOB.
I tried this -
CREATE or replace procedure insert_xml_data
IS
str varchar2(32767);
BEGIN
str :='<huge xml data>';
INSERT INTO TABLE VALUES (ID, XMLType(str));
END;
/
But, I get an error that says -
Error: ORA-06550: line 2, column 23940: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the >following:
* & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member submultiset
SQLState: 65000
ErrorCode: 6550
Error occured in:
BEGIN
Can anyone please help me here? OR a better way to accomplish this?
XML finally has be to in CLOB type.