XML Import CLOB column size limit

I have a table with a CLOB column and some of the rows have up to 7000 characters in the column. I exported the table to XML and the XML file contains all the data. When I try to import the file into another APEX instance I get the error:
XML Load error.
After some experimentation, I found that If I manually edit the XML to reduce the size of the text to under 4000 characters (3700 in my test), it imports fine.
Is there a way around this limitation? The database I'm migrating has LOTS of CLOB columns (converted from MS Access "memo" fields).

jlange,
Having converted a bunch of MS Access applications myself, I would encourage you to look at the Oracle Migration Workbench (OMWB): http://www.oracle.com/technology/tech/migration/index.html
This free tool can be downloaded from OTN, and provides a more streamlined approach to moving the data from MS Access to Oracle, including support for Memos to CLOBs.
Once you're data has been moved over, you can then use ApEx to re-create the UI.
Thanks,
- Scott -

Similar Messages

  • XML in clob columns and OWB

    I’m building some ETL process to extract data from XML in CLOB columns. I know that there are solutions to use functions as extractvalue() of WB_XML_LOAD(), but I want to know if there is any other way to deal with XML. The reason for that is because my XML files have multiple namespaces and nodes, and I need something more complex to deal with that, since I already tried those two first solutions.
    My first solution was to create a PL/SQL that parses the XML and looks for tags and elements. It populates a relational table, and I might use OWB to extract the data from this table. But I’m dealing with a large table and it takes a while for processing, plus my code is hude!
    My question is: Does someone have any experience with complex XML in Clob columns? If so, what was your solution for that?
    Thanks a lot!
    Angelo Buss
    [email protected]

    CLOB is a fully-updateable, character large object that is stored inside the database. It can be text-indexed using interMedia for document searching.
    BFILE is a readonly pointer to a file on the external file system whose content is not physically stored in the database. It can also be text-indexed for document searching, but it can't be updated.

  • Select fields from XML in CLOB column

    Hi,
    I have the following XML stored in a table as CLOB field. What i want is to select specific fields into Relational Data.
    <?xml version=1.0 encoding=UTF-8?>
    <msgContext>
        <JMSHeaders xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">
            <jms1:JMSDeliveryMode>PERSISTENT</jms1:JMSDeliveryMode>
            <jms1:JMSTimestamp>1329217943352</jms1:JMSTimestamp>
            <jms1:JMSExpiration>0</jms1:JMSExpiration>
            <jms1:JMSRedelivered>false</jms1:JMSRedelivered>
            <jms1:JMSPriority>4</jms1:JMSPriority>
        </JMSHeaders>
        <OtherProperties>
            <auditPartnerId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">010000000001189CC2BC2C</auditPartnerId>
            <auditServiceId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">Auth</auditServiceId>
            <correlationTransactionId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">d0022064-1df3-43ef-be5b-93aedc96b3b2</correlationTransactionId>
            <auditReceivedDate xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">2012-02-14 12:12:23.346 +0100</auditReceivedDate>
            <auditStatus xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">ok</auditStatus>
            <auditForwardedDate xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">2012-02-14 12:12:23.351 +0100</auditForwardedDate>
            <auditMsisdn xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms"/>
            <auditEngineId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">dpNorthLog</auditEngineId>
            <ns0:auditInfo xmlns:ns0="http://www.tibco.com/schemas/Project_gig_reporting/tib_bw_reporting/Resources/Schemas/auditInfo.xsd">
                <ns0:dp-logpoint>response</ns0:dp-logpoint>
                <ns0:dp-target-url/>
                <ns0:dp-port>20565</ns0:dp-port>
                <ns0:dp-uri>/comp_am</ns0:dp-uri>
                <ns0:dp-size>1365</ns0:dp-size>
                <ns0:dp-replytoengine/>
            </ns0:auditInfo>
        </OtherProperties>
    </msgContext>I tried to use the xml_query below with no luck :
    SELECT  x.auditPartnerId,
                 x.auditServiceId
       FROM source s
         , XMLTable(
             '/msgContext/OtherProperties'
              passing s.messagetext
              columns
              auditPartnerId   VARCHAR2(20) PATH 'auditPartnerId'
            , auditServiceId     VARCHAR2(20) PATH 'auditServiceId'
            ) x;Any help appreciated

    alekons wrote:
    Any help appreciatedYou will have to convert it to xmltype first. See below:
    SQL> select * from v$version ;
    BANNER
    Oracle Database 10g Release 10.2.0.5.0 - Production
    PL/SQL Release 10.2.0.5.0 - Production
    CORE     10.2.0.5.0     Production
    TNS for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    SQL> with src as ( select to_clob('<msgContext>
    <JMSHeaders xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">
    <jms1:JMSDeliveryMode>PERSISTENT</jms1:JMSDeliveryMode>
    <jms1:JMSTimestamp>1329217943352</jms1:JMSTimestamp>
    <jms1:JMSExpiration>0</jms1:JMSExpiration>
    <jms1:JMSRedelivered>false</jms1:JMSRedelivered>
    <jms1:JMSPriority>4</jms1:JMSPriority>
    </JMSHeaders>
    <OtherProperties>
    <auditPartnerId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">010000000001189CC2BC2C</auditPartnerId>
    <auditServiceId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">Auth</auditServiceId>
    <correlationTransactionId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">d0022064-1df3-43ef-be5b-93aedc96b3b2</correlationTransactionId>
    <auditReceivedDate xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">2012-02-14 12:12:23.346 +0100</auditReceivedDate>
    <auditStatus xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">ok</auditStatus>
    <auditForwardedDate xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">2012-02-14 12:12:23.351 +0100</auditForwardedDate>
    <auditMsisdn xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms"/>
    <auditEngineId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">dpNorthLog</auditEngineId>
    <ns0:auditInfo xmlns:ns0="http://www.tibco.com/schemas/Project_gig_reporting/tib_bw_reporting/Resources/Schemas/auditInfo.xsd">
    <ns0:dp-logpoint>response</ns0:dp-logpoint>
    <ns0:dp-target-url/>
    <ns0:dp-port>20565</ns0:dp-port>
    <ns0:dp-uri>/comp_am</ns0:dp-uri>
    <ns0:dp-size>1365</ns0:dp-size>
    <ns0:dp-replytoengine/>
    </ns0:auditInfo>
    </OtherProperties>
    </msgContext>') as messagetext from dual )
    SELECT x.auditPartnerId,
    x.auditServiceId
    FROM src s
    , XMLTable(
    '/msgContext/OtherProperties'
    passing s.messagetext
    columns
    auditPartnerId VARCHAR2(20) PATH 'auditPartnerId'
    , AUDITSERVICEID VARCHAR2(20) PATH 'auditServiceId'
    ) x;
    36   37  passing s.messagetext
    ERROR at line 33:
    ORA-00932: inconsistent datatypes: expected - got CLOB
    with src as ( select xmltype(to_clob('<msgContext>
    <JMSHeaders xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">
    <jms1:JMSDeliveryMode>PERSISTENT</jms1:JMSDeliveryMode>
    <jms1:JMSTimestamp>1329217943352</jms1:JMSTimestamp>
    <jms1:JMSExpiration>0</jms1:JMSExpiration>
    <jms1:JMSRedelivered>false</jms1:JMSRedelivered>
    <jms1:JMSPriority>4</jms1:JMSPriority>
    </JMSHeaders>
    <OtherProperties>
    <auditPartnerId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">010000000001189CC2BC2C</auditPartnerId>
    <auditServiceId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">Auth</auditServiceId>
    <correlationTransactionId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">d0022064-1df3-43ef-be5b-93aedc96b3b2</correlationTransactionId>
    <auditReceivedDate xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">2012-02-14 12:12:23.346 +0100</auditReceivedDate>
    <auditStatus xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">ok</auditStatus>
    <auditForwardedDate xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">2012-02-14 12:12:23.351 +0100</auditForwardedDate>
    <auditMsisdn xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms"/>
    <auditEngineId xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">dpNorthLog</auditEngineId>
    <ns0:auditInfo xmlns:ns0="http://www.tibco.com/schemas/Project_gig_reporting/tib_bw_reporting/Resources/Schemas/auditInfo.xsd">
    <ns0:dp-logpoint>response</ns0:dp-logpoint>
    <ns0:dp-target-url/>
    <ns0:dp-port>20565</ns0:dp-port>
    <ns0:dp-uri>/comp_am</ns0:dp-uri>
    <ns0:dp-size>1365</ns0:dp-size>
    <ns0:dp-replytoengine/>
    </ns0:auditInfo>
    </OtherProperties>
    </msgContext>')) as messagetext from dual )
    SELECT x.auditPartnerId,
    x.auditServiceId
    FROM src s
    , XMLTable(
    '/msgContext/OtherProperties'
    passing s.messagetext
    columns
    auditPartnerId VARCHAR2(20) PATH 'auditPartnerId'
    , AUDITSERVICEID VARCHAR2(20) PATH 'auditServiceId'
    37  ) x;
    AUDITPARTNERID          AUDITSERVICEID
    010000000001189CC2BC Auth

  • Load XML to CLOB column

    i want to load xml file to a column with CLOB datatype.
    I can do it with the help of tools like TOAD etc but i want to do through sql or pl/sql.
    Can anybody can help on this?

    Check this.
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html#PLSQLCode
    Regards
    Sundar

  • SQL Server 2008 XML Datatype variable size limit

    Can you please let me know the size limit for XML Data type variable in SQL Server 2008?
    I have read some where that the XML data type holds up to 2GB size. But, its not the case.
    We have defined a variable with XML data type and assigning the value by using SELECT statement FOR XML AUTO with in CTE and assigning the outout of CTE to this XML type variable. 
    When we limit the rows to 64 which has a length of 43370(used cast(@XMLvariable AS varchar(max)), the variable returns the XML. However, if i increase the rows from 64 to 65 which is length of 44048, then the variable returns with Blank value.
    Is there any LENGTH limit of the XML data type?
    Thanks in advance!!

    Hello,
    See MSDN xml (Transact-SQL), the size limit is 2 GB and it is working. If your XML data will be truncated, then because you are doing something wrong; but without knowing table design
    (DDL) and your query it's difficult to give you further assistance; so please provide more details.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Calculate total size of clob column in a table

    how to Calculate total size of clob column in a table.
    Thanks ,
    Sakthivel

    SAKTHIVEL wrote:
    I would like to calculate table size and particular clob column size inside that table. The size of the table and the size of the LOB are two totally different things.
    Barring cases where the LOB is less than 4k and stored inline, the LOB data is stored outside the table in a separate segment.
    If you want to get the combined size of the table and of its LOB segments, you could do something like
    SELECT SUM(bytes)/1024/1024 gb
      FROM dba_segments
    WHERE (owner = <<table owner>> and
           segment_name = <<table name>>)
        OR (owner, segment_name) IN (
            SELECT owner, segment_name
              FROM dba_lobs
             WHERE owner = <<table owner>>
                AND table_name = <<table name>> )Justin

  • Update of CLOB column issue

    I am not sure if this is the correct forum for this question, so please forgive if this is posted in wrong forum.
    I am new to working with CLOBs in Oracle. The procedure updates a CLOB column which stores large XML files. The XML files are first moved to the /u04 directory, then we execute the procedure which looks for the XML in /u04, then uses those XML files to update the CLOB column.
    The procure works fine in our development environment, but doesn't work in our System Test box. No exceptions are thrown in Sys Test, but when we check the CLOB column it's NULL/empty.
    Both Dev and Sys Test environments are on the same physical server.
    Is there something in the database setup I should be looking for which may cause this difference in functionality?
    Code is below. I'm sure it could be better but this is my first go-around with CLOBs.
    Any help is greatly appreciated!
      --open CLOB used to clear out old XML in CLOB column
       dbms_lob.open(v_pre_clob, dbms_lob.lob_readwrite);
       -- prep XML CLOB column for update
       UPDATE REPORT_TBL
          SET REPORT_XML = v_pre_clob
        WHERE REPORT_ID = p_rep_id;
       --Close pre-update CLOB
       dbms_lob.close(v_pre_clob);
       --get a reference to the XML CLOB that needs to be updated
       select report_xml
         into v_clob
         from report_tbl
        where report_id = p_rep_id for update;   
       --open the target CLOB and source report xml file in /u04
       dbms_lob.open(v_clob, dbms_lob.lob_readwrite);
       dbms_lob.open(v_report_xml_file);
       --Load the contents of the xml file in /u04 into the CLOB column
       dbms_lob.loadclobfromfile(v_clob, v_xml_file,
                                 dbms_lob.lobmaxsize,
                                 v_destination_offset, v_source_offset,
                                 nls_charset_id('US7ASCII'),
                                 v_language_context, v_warning_message);
       --Check for the only possible warning message.
       if v_warning_message = dbms_lob.warn_inconvertible_char then
            dbms_output.put_line('Warning! Some characters couldn''t be converted.');  
       end if;
       --Close both LOBs
       dbms_lob.close(v_clob);
       dbms_lob.close(v_xml_file);
       null;
       EXCEPTION
          WHEN OTHERS THEN
             v_return_code := SQLCODE;
             v_return_mesg := SQLERRM;
             DBMS_OUTPUT.PUT_LINE('PROCEDURE update_xml_from_file');
             DBMS_OUTPUT.PUT_LINE('RETURN_CODE = ' || v_return_code);
             DBMS_OUTPUT.PUT_LINE('RETURN_MESG = ' || v_return_mesg);

    Sorry, pulled that code from development where it was working.
    The issue was the GRANT on the /u04 directory.

  • How do you include CLOB data in XML document? Is there a size limit?

    Im actually using the Oracle API's to create an XML document as a clob.
    But for the columns that are CLOB columns they just put
    <column>(CLOB)</column> in the document and not the actual CLOB.
    Anybody know the direction I need to resolve this?

    Could you post the code that is causing this?

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • Searching CLOB column of XML documents with leading wildcard - Performance

    Hi, our table has a text indexed CLOB column of XML documents and when performing a search with a leading wild card, we never retrieve any results.
    The query looks like this:
    select id from <table> where contains(columnname, '(%12345)') > 0;
    I cant even generate an explain plan from this query. I killed it after 39 minutes.
    If the query changes to:
    select id from <table> where contains(columnname, '(12345%)') > 0;
    I get an explain plan immediately with a cost=2 and when I execute the query, I get results in less than a second.
    I'd appreciate any thoughts of what I should check or what the problem might be.
    Thanks! Doug

    Can you provide a script that reproduces the case. I am unable to reproduce the problem with just some small sample data, as shown below. That means that there is nothing wrong with the syntax, but you may be having problems due to the size of your data or other parameters that have not been mentioned.
    SCOTT@10gXE> CREATE TABLE your_table (id NUMBER, columnname CLOB)
      2  /
    Table created.
    SCOTT@10gXE> insert into your_table
      2  select 1, dbms_xmlgen.getxml
      3             ('select deptno, dname,
      4                   cursor (select empno, ename
      5                        from      emp
      6                        where  emp.deptno = dept.deptno ) employee
      7               from   dept
      8               where  deptno = 10')
      9  from   dual
    10  /
    1 row created.
    SCOTT@10gXE> SELECT * FROM your_table
      2  /
            ID COLUMNNAME
             1 <?xml version="1.0"?>
               <ROWSET>
                <ROW>
                 <DEPTNO>10</DEPTNO>
                 <DNAME>ACCOUNTING</DNAME>
                 <EMPLOYEE>
                  <EMPLOYEE_ROW>
                   <EMPNO>7782</EMPNO>
                   <ENAME>CLARK</ENAME>
                  </EMPLOYEE_ROW>
                  <EMPLOYEE_ROW>
                   <EMPNO>7839</EMPNO>
                   <ENAME>KING</ENAME>
                  </EMPLOYEE_ROW>
                  <EMPLOYEE_ROW>
                   <EMPNO>7934</EMPNO>
                   <ENAME>MILLER</ENAME>
                  </EMPLOYEE_ROW>
                 </EMPLOYEE>
                </ROW>
               </ROWSET>
    SCOTT@10gXE> CREATE INDEX your_idx ON your_table (columnname)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  /
    Index created.
    SCOTT@10gXE> EXEC DBMS_STATS.GATHER_TABLE_STATS ('SCOTT', 'YOUR_TABLE')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SET AUTOTRACE ON EXPLAIN
    SCOTT@10gXE> select id from your_table where contains (columnname, '(%839)') > 0
      2  /
            ID
             1
    Execution Plan
    Plan hash value: 2832585188
    | Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |            |     1 |   888 |     0   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| YOUR_TABLE |     1 |   888 |     0   (0)| 00:00:01 |
    |*  2 |   DOMAIN INDEX              | YOUR_IDX   |       |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("CTXSYS"."CONTAINS"("COLUMNNAME",'(%839)')>0)
    SCOTT@10gXE> SET AUTOTRACE OFF

  • Intermedia CLOB size limit?

    Hi all,
    I have a weird problem using Intermedia on a 8.1.7 EE database (default character set UTF8) on Solaris 2.8 . I'm using intermedia to index a clob column (with a composite index primary key). That columns stores xml documents. It is working fine for small documents (2038 bytes or less) but documents over that size are not indexed, even though the log says they are processed. Changing the size of the data in other columns (varchar2) doesn't affect the maximum size. I have tried to put the lob in the same tablespace, in a different one, I have disabled storage in row, tried with BLOB instead of CLOB, with no joy. Surely there is a way to index documents bigger than 2K?
    Thanks for any pointers!
    null

    Much like most SQL statements can't have literals over 4k, neither can setString work with strings longer than 32k. This isn't a DB issue, however, as it is a limitation of the API. If your using a JPA (like toplink), then they implemented storing LOBs using setString, which is very easy, but has the limitation you've found.
    You can either find an implementation that uses streams (without the limitation) or, if you're not using JPA, write one yourself.

  • How to retreive soap xml data from clob column in a table

    Hi,
    I am trying to retrieve the XML tag value from clob column.
    Table name = xyz and column= abc (clob datatype)
    data stored in abc column is as below
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:head="http://www.abc.com/gcgi/shared/system/header" xmlns:v6="http://www.abc.com/gcgi/services/v6_0_0_0" xmlns:sys="http://www.abc.com/gcgi/shared/system/systemtypes">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <RqHeader soapenv:mustUnderstand="0" xmlns="http://www.abc.com/gcgi/shared/system/header">
    <DateAndTimeStamp>2011-12-20T16:02:36.677+08:00</DateAndTimeStamp>
    <UUID>1000002932</UUID>
    <Version>6_0_0_0</Version>
    <ClientDetails>
    <Org>ABC</Org>
    <OrgUnit>ABC</OrgUnit>
    <ChannelID>HBK</ChannelID>
    <TerminalID>0000</TerminalID>
    <SrcCountryCode>SG</SrcCountryCode>
    <DestCountryCode>SG</DestCountryCode>
    <UserGroup>HBK</UserGroup>
    </ClientDetails>
    </RqHeader>
    <wsa:Action>/SvcImpl/bank/
    SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq</wsa:Action></soapenv:Header>
    <soapenv:Body>
    <v6:AlertDeleteInqRq>
    <v6:Base>
    <v6:VID>20071209013112</v6:VID>
    <!--Optional:-->
    <v6:Ref>CTAA00000002644</v6:Ref>
    </v6:Base>
    </v6:AlertDeleteInqRq>
    </soapenv:Body>
    </soapenv:Envelope>
    And i want to retrieve the values of tag
    <ChannelID> and <v6:VID>
    can somebody help, i have tried with extractvalue but not able to get the values

    I have used the below two queries but not able to get the expected results. Both queries result into no values.
    select xmltype(MED_REQ_PAYLOAD).extract('//ClientDetails/Org','xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" || xmlns="http://www.abc.com/gcgi/shared/system/header"').getStringValue() from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/alerts/v6_0_0_0/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    select EXTRACTVALUE(xmltype(MED_REQ_PAYLOAD),'/RqHeader/) from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    Well, for starters, both queries are syntactically wrong :
    - non terminated string
    - incorrect namespace mapping declaration
    - unknown XMLType method "getStringValue()"
    Secondly, all those functions are deprecated now.
    Here's an up-to-date example using XMLTable. It will retrieve the two tag values you mentioned :
    SQL> select x.*
      2  from esb_output_temp t
      3     , xmltable(
      4         xmlnamespaces(
      5           'http://schemas.xmlsoap.org/soap/envelope/' as "soap"
      6         , 'http://www.abc.com/gcgi/shared/system/header' as "head"
      7         , 'http://www.abc.com/gcgi/services/v6_0_0_0' as "v6"
      8         )
      9       , '/soap:Envelope'
    10         passing xmlparse(document t.med_req_payload)
    11         columns ChannelID  varchar2(10) path 'soap:Header/head:RqHeader/head:ClientDetails/head:ChannelID'
    12               , VID        varchar2(30) path 'soap:Body/v6:AlertDeleteInqRq/v6:Base/v6:VID'
    13       ) x
    14  ;
    CHANNELID  VID
    HBK        20071209013112
    You may also want to store XML in XMLType columns for both performance and storage optimizations.

  • Trying to Insert an XML Element into XML data stored in CLOB column

    Hi all,
    My ORACLE DB version is:
    ('Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production');
    ('PL/SQL Release 11.2.0.2.0 - Production');
    ('CORE 11.2.0.2.0 Production');
    ('TNS for Linux: Version 11.2.0.2.0 - Production');
    ('NLSRTL Version 11.2.0.2.0 - Production');
    I have this XML data stored in a CLOB column:
    <Activity>
         <Changes>     
         </Changes>
         <Inserts>     
         </Inserts>
         <Definition>     
         </Definition>
         <Assignment TYPE="Apply">     
         </Assignment>
         <Spawned>
              <Activity>576D8CD9-57A1-8608-1563-8F6DC74BDF3C</Activity>
              <Activity>11226E79-5D24-02EB-A950-D34A9CCFB3FF</Activity>
              <Activity>DAA68DC0-CA9A-BB15-DE31-9596E19513EE</Activity>
              <Activity>93F667D6-966A-7EAD-9B70-630D9BEFDDD2</Activity>
              <Activity>FA63D9D3-86BB-3FF0-BE69-17EAA7581637</Activity>
         </Spawned>
         <SpawnedBy>AFC49BD4-5AA7-38C0-AE27-F59D16EE1B1C</SpawnedBy>
    </Activity>
    I am in need of some assistance in creating an update that will insert another <Activity>SomeGUID</Activity> into the <Spawned> parent.
    Any help is greatly appreciated.
    Thanks.
    Edited by: 943783 on Dec 14, 2012 12:58 PM

    See XML updating functions : http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb04cre.htm#i1032611
    For example :
    UPDATE my_table t
    SET t.my_clob =
          XMLSerialize(document
            insertChildXML(
              XMLParse(document t.my_clob)
            , '/Activity/Spawned'
            , 'Activity'
            , XMLElement("Activity", 'Some GUID')
    WHERE ...
    ;Although it works, there's overhead introduced by parsing the CLOB, then serializing again.
    Is there any chance you can change the CLOB to SECUREFILE binary XMLType storage instead?
    You would then be able to benefit from optimized piecewise update of the XML and improved storage.

  • Reading Xml file from clob column in the staging table

    Hi,
    I am trying to poll the staging table with the database adapter which has CLOB column type containing XML file. How do I extract the XML file from CLOB and map the fields to the another variable with definite schema.
    Thanks,
    Edited by: chaitu123 on Sep 20, 2009 8:16 AM

    1) when you create DBAdapter on a table which having the clob column watch closely the created xsd for the DBAdapter the clob cloumn element should be a String data type
    2) create xsd for Xml File and create variable for the xsd element
    3) use ora:parseEscapedXML("yourDBAdapterclobElement") to XmlFileVarilable
    Krishna

  • Remove an element from XML present in CLOB column

    Hi,
    I need to remove element TEST2 and TEST3 from the below XML which is present in the CLOB column of a table. I need to do this using DBMS_XMLDOM package of Oracle as my existing code is using the same -
    <ROOT>
    <LEAF1>
    <TEST1>TEXT1</TEST1>
    <TEST2>TEXT2</TEST2>
    <TEST3>TEXT3</TEST3>
    </LEAF1>
    </ROOT>
    Hence the final o/p should be like
    <ROOT>
    <LEAF1>
    <TEST1>TEXT1</TEST1>
    </LEAF1>
    </ROOT>
    Please suggest how to achieve this.

    Something like this?
    Anton
    declare
      t_doc dbms_xmldom.DOMDocument;
      t_root dbms_xmldom.DOMNode;
      t_node dbms_xmldom.DOMNode;
      t_buf varchar2(1000);
    begin
      t_doc := dbms_xmldom.newDOMDocument( xmltype( '<ROOT>
    <LEAF1>
    <TEST1>TEXT1</TEST1>
    <TEST2>TEXT2</TEST2>
    <TEST3>TEXT3</TEST3>
    </LEAF1>
    </ROOT>' ) );
      t_root := dbms_xmldom.makeNode( t_doc );
      t_node := dbms_xmldom.removeChild( t_root, dbms_xslprocessor.selectSingleNode( t_root, '/ROOT/LEAF1/TEST2' ) );
      t_node := dbms_xmldom.removeChild( t_root, dbms_xslprocessor.selectSingleNode( t_root, '/ROOT/LEAF1/TEST3' ) );
      dbms_xmldom.writetoBuffer( t_root, t_buf );
      dbms_output.put_line( t_buf );
    end;

Maybe you are looking for

  • Open URL in a new window by closing the parent window

    Hi Friends, Is there any option to open URL in a new window by closing the parent window on a button click? Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the

  • Iphone 5s lost LTE, 4g, weak signal. dropped calls after upgrading to IOS 8.1

    i recently upgraded my iphone 5s to IOS 8.1 , after the upgrade i lost LTE and 4g, connectivity and stuck to 3g, i observed that my phone's got weker signal than before, i have intermittent signal during calls, and dropped calls. i did go to my servi

  • USER EXIT or BADI for MIGO

    Hi friends, The Issue is: User tries to execute Migo with 103 or 101 movement. I want to throw an error if the posting date of the item is Before its original Delivery date in PO. I tried exit MBCF0005 and applied 'break-point' but its not going to d

  • Preferred vendor not being copied from the selection list of F4 --- Shop

    Hi SRM Gurus,   When we are creating a shopping cart with the sources of supply, preferred list of vendors is displayed when we click the icon next to the preferred vendor in the browser.  Source of supply, F4 in GUI also gives a list of vendors but

  • Need WXP MCE drivers for Qosmio F20

    Hi everyone. I recently reloaded the OS on a clients Qosmio F20 (PQF20A-00D00C). They didn't have any recovery disks and I didn't make any recovery disks (as per a KB article I found later - not that I recall any such menu item). I am looking for the