Need help to reproduce, construct a standalone test case from START to FINISH (eg: I had to build a create table statement, I shouldn't have to do that, you should have done that - it might be important - the manner in which you typed in the create table, I had to make it up, make sure it is a create table statement ANYONE IN THE WORLD can execute)
versions would be useful too perhaps.
ops$tkyte%ORA10GR2> create table dec_zddfl50_2008
2 (
3 DEC_ID NUMBER NOT NULL,
4 TP_ID NUMBER NOT NULL,
5 DATA SYS.XMLTYPE,
6 INNO VARCHAR2(30),
7 INNODATE DATE,
8 RECEIVEDATE DATE,
9 LASTMODIFIED DATE,
10 STATUS NUMBER(38) NOT NULL,
11 ENTRY NUMBER(38) NOT NULL,
12 DOC_ID NUMBER(38),
13 CERT_ID NUMBER(38)
14 )
15 /
Table created.
ops$tkyte%ORA10GR2> insert into dec_zddfl50_2008 values (1,1,'<x>hello world</x>','abc',sysdate-2,sysdate-2,sysdate-2,1,1,1,1);
1 row created.
ops$tkyte%ORA10GR2> insert into dec_zddfl50_2008 values (1,1,'<x>goodbye </x>','abc',sysdate-1,sysdate-1,sysdate-1,1,1,1,1);
1 row created.
ops$tkyte%ORA10GR2>
ops$tkyte%ORA10GR2> drop table test_xml_data;
Table dropped.
ops$tkyte%ORA10GR2>
ops$tkyte%ORA10GR2> create table test_xml_data
2 (dec_id number not null,
3 xml_data clob);
Table created.
ops$tkyte%ORA10GR2>
ops$tkyte%ORA10GR2> insert into test_xml_data
2 (dec_id, xml_data)
3 select dec_id, fromis.data.getclobval() xml_data
4 from dec_zddfl50_2008@ora10gr2@loopback fromis
5 where fromis.status=1 and
6 trunc(fromis.lastmodified)=trunc(sysdate-2)
7 /
1 row created.
ops$tkyte%ORA10GR2>
ops$tkyte%ORA10GR2> commit
2 /
Commit complete.
ops$tkyte%ORA10GR2>
ops$tkyte%ORA10GR2> create or replace procedure test_xmldata is
2 begin
3 insert into test_xml_data
4 (dec_id, xml_data)
5 select dec_id, fromis.data.getclobval() xml_data
6 from dec_zddfl50_2008@ora10gr2@loopback fromis
7 where fromis.status=1 and
8 trunc(fromis.lastmodified)=trunc(sysdate-1);
9 end;
10 /
Procedure created.
ops$tkyte%ORA10GR2>
ops$tkyte%ORA10GR2> exec test_xmldata;
PL/SQL procedure successfully completed.
ops$tkyte%ORA10GR2> select rownum, data from dec_zddfl50_2008;
ROWNUM
----------
DATA
-------------------------------------------------------------------------------
1
<x>hello world</x>
2
<x>goodbye </x>