Insertion of an array of XML stream

Hello
My version of db: database Oracle 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

I have a xml as below:
<?xml version="1.0"?>
<ROWSET>
    <ROW>
    <id>123</id>
    <aname>1</aname>
    <a>CNET</a>
    <b>21416911</b>
    <c>12345678</c>
    <d>878787</d>
    </ROW>
    <ROW>
    <id>234</id>
    <aname>2</aname>    
    <a>DNET</a>
    <b>21416911</b>
    <c>12345678</c>
    <d>878787</d>
    </ROW>    
</ROWSET>
 
creating a test table:
CREATE TABLE test (
    id NUMBER(16),
    aname VARCHAR2(30),
    friendlyname VARCHAR2(150),
    value varchar2(200));
I want to insert the XML in the test of the table as below
SELECT * FROM test;
id     aname     friendlyname     value
123     1     a     CNET
123     1     b     21416911
123     1     c     12345678
123     1     d     878787
234     2     a     DNET
234     2     b     21416911
234     2     c     12345678
234     2     d     878787
< Aname > and < id > elements are mandatory. They come with each xml stream.
Please let me know if it is possible.

Published by: 934451 on December 14, 2012 12:00

Published by: 934451 on December 14, 2012 12:15

Welcome.

You can do it like this, assuming that all items besides and always come after :

SQL> DECLARE
  2
  3    xmldoc xmltype := xmltype(
  4  '
  5  
  6      
  7      123
  8      1
  9      CNET
 10      21416911
 11      12345678
 12      878787
 13      
 14      
 15      234
 16      2
 17      DNET
 18      21416911
 19      12345678
 20      878787
 21      
 22  ') ;
 23
 24  BEGIN
 25
 26    INSERT INTO test (id, aname, friendlyname, value)
 27    SELECT x1.id, x1.aname, x2.fname, x2.value
 28    FROM XMLTable(
 29           '/ROWSET/ROW'
 30           passing xmldoc
 31           columns id       number(16)    path 'id'
 32                 , aname    varchar2(30)  path 'aname'
 33                 , xml_coll xmltype       path 'aname/following-sibling::*'
 34         ) x1
 35       , XMLTable(
 36           '*'
 37           passing x1.xml_coll
 38           columns fname varchar2(150) path 'local-name(.)'
 39                 , value varchar2(200) path 'text()'
 40         ) x2 ;
 41
 42  END;
 43  /

PL/SQL procedure successfully completed

SQL> select * from test;

               ID ANAME                          FRIENDLYNAME    VALUE
----------------- ------------------------------ --------------- --------------------
              123 1                              a               CNET
              123 1                              b               21416911
              123 1                              c               12345678
              123 1                              d               878787
              234 2                              a               DNET
              234 2                              b               21416911
              234 2                              c               12345678
              234 2                              d               878787

8 rows selected
 

The next sibling axis can show poor performance on large XMLs.
It would be better and be easier to deal with if you had to, b, c and d, wrapped in their own enclosing element:


  
    123
    1
    
      CNET
      21416911
      12345678
      878787
    
  
  ...

Tags: Oracle Development

Similar Questions

  • XML streaming

    I learned today that my client wants that their data in XML format. I need to write either continuous data to an XML file to 1 Hz or I need to convert a TDMS file has been completed in XML. TDMS files can have up to 250 K data points. If someone has done something like this? I love PDM and the existing XML vi is scarce and does not offer much in terms of flexibility and functionality. Any thoughts? Thanks in advance.

    The thing with XML stream, is that the file is not valid XML, unless all tags are properly closed. Some applications tolerate that, but it is atypical, so other applications won't load files. XML files have tags that surround the entire load, by definition, so closing tags must be written (and previous deleted tags) each time add you to the file. XML engines as Xerces do this by always writing the entire file, instead of incrementally add something to him. Is usually not an option for streaming applications, because performance degrades with the file more and more strongly in size. Since your acquisition seems finished, it will come down to whether it still works amount of data that you store. If it isn't, you could for example write code which replaces the last characters in the file (for existing stomp of closing tags), or you can convert to PDM after acquisition.

    Hope that helps,

    Herbert

  • javax.xml.stream.XMLStreamException: unexpected end of Document

    from one moment to the other occurred to me this error. I did not something new. can someone help me?

    < 19 August 2015 11:33:54 CEST > < critical > < WebLogicServer > < BEA-000386 > < server subsystem failed. Reason: weblogic.security.SecurityInitializationException: loading of the OPSS java security policy provider failed because of the exception, see exception stack trace or the root server log file. If still don't see no obvious cause, turn on debugging of the flag - Djava.security.debug = jpspolicy for more information. Error message: cannot read the policy store. Reason is the error PolicyStore javax.xml.stream.XMLStreamException: unexpected end of Document

    weblogic.security.SecurityInitializationException: loading of the OPSS java security policy provider failed because of the exception, see exception stack trace or the root server log file. If still don't see no obvious cause, turn on debugging of the flag - Djava.security.debug = jpspolicy for more information. Error message: cannot read the policy store. Reason is the error PolicyStore javax.xml.stream.XMLStreamException: unexpected end of Document

    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1398)

    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1018)

    at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)

    at weblogic.security.SecurityService.start(SecurityService.java:141)

    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)

    Truncated. check the log file full stacktrace

    Caused by: oracle.security.jps.JpsRuntimeException: cannot read the policy store. Reason is the error PolicyStore javax.xml.stream.XMLStreamException: unexpected end of Document

    at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.buildFromFile(XmlPolicyStore.java:496)

    to oracle.security.jps.internal.policystore.xml.XmlPolicyStore. < init > (XmlPolicyStore.java:276)

    at oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider.getInstance(XmlPolicyStoreProvider.java:100)

    at oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider.getInstance(XmlPolicyStoreProvider.java:74)

    at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.findServiceInstance(ContextFactoryImpl.java:139)

    Truncated. check the log file full stacktrace

    Caused by: oracle.security.jps.JpsRuntimeException: javax.xml.stream.XMLStreamException: unexpected end of Document

    at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntryStax(XmlDataStoreParser.java:166)

    at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntry(XmlDataStoreParser.java:180)

    at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntry(XmlDataStoreParser.java:187)

    at oracle.security.jps.internal.core.datastore.xml.XmlDataStore.loadXmlDataStore(XmlDataStore.java:411)

    to oracle.security.jps.internal.core.datastore.xml.XmlDataStore. < init > (XmlDataStore.java:276)

    Truncated. check the log file full stacktrace

    Caused by: javax.xml.stream.XMLStreamException: unexpected end of Document

    at weblogic.xml.stax.XMLStreamReaderBase.getElementText(XMLStreamReaderBase.java:289)

    at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.getElementText(StaxPolicyStoreParser.java:4815)

    at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processPermission(StaxPolicyStoreParser.java:4760)

    at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processGrant(StaxPolicyStoreParser.java:4309)

    at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processJaznPolicy(StaxPolicyStoreParser.java:4253)

    Truncated. check the log file full stacktrace

    >

    < 19 August 2015 11:33:54 CEST > < opinion > < WebLogicServer > < BEA-000365 > < changed failed State Server >

    < 19 August 2015 11:33:54 CEST > < error > < WebLogicServer > < BEA-000383 > < is not an essential service. The server will shut down >

    < 19 August 2015 11:33:54 CEST > < opinion > < WebLogicServer > < BEA-000365 > < server status changed to FORCE_SHUTTING_DOWN >

    Process is complete.

    I have change the file system-jazn-"Data.xml" and his works.

  • How to insert values of array of String in BPM

    Hello

    I have defined an array of strings in the business object, created a data object and want to fill/insert values inside. I searched a lot of messages and tried several options but no luck.

    My BO:

    " < xs: Schema targetNamespace = ' http://xmlns.Oracle.com/BPM/bpmobject/TestTypes/SimpleArrayBO "elementFormDefault ="qualified"xmlns =" http://xmlns.Oracle.com/BPM/bpmobject/TestTypes/SimpleArrayBO "" xmlns: XS = " http://www.w3.org/2001/XMLSchema " xmlns:bpmo =" http://xmlns.Oracle.com/BPM/bpmobject/ " > ""

    < name XS: complexType = "SimpleArrayBOType" >

    < xs: SEQUENCE >

    < name XS: ELEMENT = "attr1" nillable = "true" type = "xs: String" maxOccurs = "unbounded" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < xs: element name = "SimpleArrayBO" type = "SimpleArrayBOType" / >

    < / xs: Schema >

    Add a script task and tried different ways to fill in the values.

    Basic ['a', 'b'] also fails with the error expected "-result tree fragment" rather than "string".

    How to manually enter the values?

    Thank you

    Chandra

    Because your input is coming from a few strings and not a table, you can just add a Script activity to your process and to define table of your target XSD using XML.

    To do this, you must add a Script to the activity-> in the "Application" tab click on 'Data Associations'-> dragging the "Expression" icon above your target object on the right side (not the table but the table parent)-> open the XPath expression box in the Middle-> click 'XPath Exp' in the drop-down list at the top.

    I used your XSD to create the XML file for the logic below:

    oraext:ParseXml (concat ('))

    http://www.w3.org/2001/XMLSchema-instance '.

    "" xsi: schemaLocation = "http://xmlns.oracle.com/bpm/bpmobject/TestTypes/SimpleArrayBO xsd/mySimpleArray.xsd.

    xmlns ="http://xmlns.oracle.com/bpm/bpmobject/TestTypes/SimpleArrayBO" >. "

    ', bpmn:getDataObject('string1') '

    ', bpmn:getDataObject('string2') '

    '))

    When I 'bpmn:getDataObject('...')', you should rather to insert your data object variables both your process chain.

    Hope it gets you going,

    Dan

  • Array of bytes Streaming playback

    Hello:

    Could someone french me some light, how could I impliment line three of the code in Labview?

    I have a pulse oximetry sensor conncected to Labview via a serial port VISA. Communication is very good, and I read 5 bytes successfully.

    However, each cycle, the context of the 3rd byte changes. Question is how can I build an array in the while loop (main), passing the value of octet 3 in another table.

    Byte0 | Octet1 | Octet2 | Byte 3 |  Byte4

    Number of sample to 1 / 1 255 255 100 255

    Number of sample2 1 255 255 255 50

    Number of Sample3 1 255 255 255 98

    The sensor will send 25 5bytes package, three times per second.

    The Streaming variable may represent 1 d table consists of 25 byte values #3.

    Then the rest of the algorithm would go on this Board on spidific, print the third value.

    For (i = 0; i<=25;>

    {

    InByte [i] = value ;} Streaming

    Serial.Print ("inByte [# favorite bytes print]" "");

    Could anyone recommend an appropriate approach rather tables? or it's the right path to take?

    I have attached the data of the page7 TCHF probe data sheet hanging in detail.

    Any help would be appreciated.

    KALOU

    Here is a similar example to what recommended Dennis.

    Lynn

  • Add unflatteded array of arrays of XML element?

    Hello everyone, once again

    I'm reading in an old XML file to get the data from it and write the data to an XML file which is almost identical, but has another control for each section. To change this VI I work still must add the ENUM "Welding/potting" (the control that was added to each section) array of arrays that is noticed.

    Basically, it's just a problem of flow data, just trying to get the corresponding data types. Im trying to add the ENUM ' Welding/table to draw' to all the tables to match the output (to the right of the VI) suggestions necessary?

    Thanks to you all!

    Solved, indexed with a loop For, then Unbundled and was able to add normally

  • Cannot insert data of type string/xml in table

    I am able to read the xml through utl_file. String, but I am not able to the same insert into the table through DBMS_XMLSTORE

    CDSL_UPLOAD is the download directory
    CDSL is the username

    PL, let myself be guided if something wrong with the following script

    SCRIPT OF THE TRIAL. XML FILE

    <? XML version = "1.0"? >
    < metadata >
    -zip codes >
    -< mappings Record = "4" >
    CA < STATE_ABBREVIATION > < / STATE_ABBREVIATION >
    < ZIPCODE > 94301 < / code >
    < / maps >
    -< mappings Record = "5" >
    < STATE_ABBREVIATION > CO < / STATE_ABBREVIATION >
    < ZIPCODE > 80323 < / code >
    < ZIP_CODE_EXTN > 9277 < / ZIP_CODE_EXTN >
    < / maps >
    < / zip codes >
    < / metadata >



    CREATE TABLE TRIALZIPCODES
    (
    STATE_ABBR VARCHAR2 (20) NOT NULL
    NUMBER ZIP_CODE (10, 0) NOT NULL
    , ZIP_CODE_EXT VARCHAR2 (20)
    );


    create or replace PROCEDURE first INSTANCE AS
    BEGIN
    DECLARE
    -declaring attributes

    charString varchar2 (80);
    finalStr varchar2 (4000): = null;
    whole rowsp;
    v_FileHandle UTL_FILE. TYPE_DE_FICHIER;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    DNAME varchar2 (20);
    Start
    dnom: = "CDSL_UPLOAD";

    -DBMS_XMLGEN.setRowTag (ctx IN ctxHandle, rowTag IN VARCHAR2);
    -DBMS_XMLGEN.setRowSetTag (ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -the name of the table specified in our DTD
    DBMS_XMLGEN. SETROWSETTAG ("l_context_handle,'s postal Code");
    -the name of the data set as shown in our DTD
    DBMS_xmlgen.setRowTag (l_context_handle, 'mappings');
    -to get the result on the screen
    dbms_output. Enable (1000000);
    -Open the XML document in read-only mode
    v_FileHandle: = utl_file.fopen (dname, 'trial.xml', 'r');

    loop

    BEGIN

    UTL_FILE.get_line (v_FileHandle, charString);
    exception
    When no_data_found then
    UTL_FILE.fclose (v_FileHandle);
    "exit";

    END;
    dbms_output.put_line (charstring);
    If finalStr is not null then
    finalStr: = finalStr | charString;
    on the other
    finalStr: = charString.
    end if;
    end loop;
    -for the insertion of XML data in the table
    insCtx: = DBMS_XMLSTORE. NEWCONTEXT('CDSL.) TRIALZIPCODES');
    insCtx: = DBMS_XMLSTORE. INSERTXML (insCtx, finalStr); --ALSO FAILED HERE
    dbms_output.put_line ('INSERT FACT' |) To_char (rowsp));
    DBMS_XMLStore.closeContext (insCtx);
    END;

    TRIAL END;

    Procedure returns the following error
    ORA-031011 XML parsing failed
    ORA-19202 error has occurred in the processing of xml
    LPX-00222 error returned to the SAX callback function
    ORA-06512 at SYS. XMLSTORE 70 line
    ORA-06512 CDSL. FIRST line 47
    ORA-06512 line 2

    PL I want to know what is the problem with the above script

    Thank you
    Vishal

    Indeed a few questions:

    (1) I don't see what possible use of this part:

    -- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
    -- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -- the name of the table as specified in our DTD
    DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcode s');
    -- the name of the data set as specified in our DTD
    DBMS_xmlgen.setRowTag(l_context_handle,'mappings') ;
    

    (2) not really a problem, but do not use UTL_FILE to read XML files. Oracle already provides the practice of methods or procedures to read XML efficiently with an call (see examples below).

    (3) in order to use the DBMS_XMLSTORE, the names of XML elements must match the columns in the table exactly, which is not the case here. If you cannot change the structure of the XML or the structure of the table to get an exact match, you can pre-process the file (with XSLT, for example).

    So, below is an example of using DBMS_XMLSTORE and an alternative with XMLTable that offers more flexibility:

    SQL> CREATE TABLE TRIALZIPCODES (
      2    STATE_ABBREVIATION VARCHAR2(20) NOT NULL
      3  , ZIPCODE NUMBER(10, 0) NOT NULL
      4  , ZIP_CODE_EXTN VARCHAR2(20)
      5  );
    
    Table created
    
    SQL> set serveroutput on
    SQL> DECLARE
      2
      3   xmldoc   clob;
      4   insCtx   DBMS_XMLStore.ctxType;
      5   dname    varchar2(20) := 'TEST_DIR';
      6   numrows  number;
      7
      8  BEGIN
      9
     10   xmldoc := dbms_xslprocessor.read2clob(dname, 'trial.xml');
     11
     12   insCtx := DBMS_XMLStore.newContext('TRIALZIPCODES');
     13   DBMS_XMLStore.setRowTag(insCtx, 'mappings');
     14   numrows := DBMS_XMLStore.insertXML(insCtx, xmldoc);
     15
     16   dbms_output.put_line('INSERT DONE '||TO_CHAR(numrows));
     17
     18   DBMS_XMLStore.closeContext(insCtx);
     19
     20  END;
     21  /
    
    INSERT DONE 2
    
    PL/SQL procedure successfully completed
    
    SQL> select * from trialzipcodes;
    
    STATE_ABBREVIATION       ZIPCODE ZIP_CODE_EXTN
    -------------------- ----------- --------------------
    CA                         94301
    CO                         80323 9277
     
    

    Or,

    SQL> select *
      2  from xmltable('/metadata/Zipcodes/mappings'
      3         passing xmltype(bfilename('TEST_DIR', 'trial.xml'), nls_charset_id('AL32UTF8'))
      4         columns state_abbr    varchar2(20) path 'STATE_ABBREVIATION'
      5               , zip_code      number(10)   path 'ZIPCODE'
      6               , zip_code_ext  varchar2(20) path 'ZIP_CODE_EXTN'
      7       )
      8  ;
    
    STATE_ABBR              ZIP_CODE ZIP_CODE_EXT
    -------------------- ----------- --------------------
    CA                         94301
    CO                         80323 9277
     
    
  • Can not get &amp; quot; Insert Flash Movie &amp; quot; Dreamweaver to stream

    I have installed FMS2.

    I have Dreamweaver 8.

    My path to the in the FMS Applications folder is the default.

    My Web server has a folder that I publish my HTM and SWF files. (the applications folder is NOT in the web accessible folder).

    My .flv files live in Applications/App_Name/streams/_definst_/something.flv

    I guess App_Name is my request. Which of the above would be my forum? What would my name of the stream?

    In view of this path, what should the URI be that I put in the dialog box insert Flash Movie?

    Any help would be great.

    Thank you

    Need a good amount of hand coding in HomeSite on the htm file but I got. Thank you. The news of multiple paths were decisive for doing things.

  • Read an XML stream

    I need the code of aid or for example. I have some CF MX 7.0.1 and I was able to send XML requests to sellers and to accept and deal with their responses. Now, I would do the same for my clients. I have problems with the implementation of a listener to transfer the stream to a structure that I can handle. Any help would be great. Thank you.

    See the attached code to begin.

  • XML for the interface Oracle even insert County regardless of input XML file

    Do not know how to get around this one... I have an interface that simply transfers the contents of an XML file into an Oracle table. I get the same count insert and documents regardless of the XML file that I use.

    I used a property with this file, but then just decided to use memory to process the file. So, in the physical architecture of the topology XML object, I simply specify the name of the file, xsd and the schema.

    Any thoughts on what's going on / what to check?

    try adding dod = true (Drop on logout) to the XML server in the topology Manager.
    This happens due to the fact that XML driver does not release the contents of the XML in memory. You must restart the agent to get the updated data.

  • inserting data in Oracle 9i XML

    Hello

    I want to insert xml data in a table (crmk_kplusdata).
    The procedure runs without error, but no data is inserted into the table.
    because the loop exits without a single iteration

    My procedure is as follows...

    create or replace procedure CRM_UploadKPLUS
    (
    v_xmlstr IN CLOB,
    V_RETURNMSG OUT VARCHAR2
    )
    AS
    XMLTYPE details;

    BEGIN
    Details: = xmltype.createxml (v_xmlstr);


    delete from crmk_kplusdata;


    for j IN
    (
    SELECT XMLTYPE. Extract(value (a), ' Table/Location/text()').getstringval (LIKE v_str1),)
    XMLTYPE. Extract(value (a), ' Table/CountriesGrp_Id/text()').getstringval (LIKE v_str2),)
    XMLTYPE. Extract(value (a), ' Table/CountriesGrp_ShortName/text()').getstringval (LIKE v_str3),)
    XMLTYPE. Extract(value (a), ' Table/Countries_ShortName/text()').getstringval (LIKE v_str4),)
    XMLTYPE. Extract(value (a), ' Table/LimitsTypes_ShortName/text()').getstringval (LIKE v_str5),)
    XMLTYPE. Extract(value (a), ' Table/DealsGroup/text()').getstringval (LIKE v_str6),)
    XMLTYPE. Extract(value (a), ' Table/KdbTables_DisplayName/text()').getstringval (LIKE v_str7),)
    XMLTYPE. Extract(value (a), ' Table/DealId/text()').getstringval (LIKE v_str8),)
    XMLTYPE. Extract(value (a), ' Table/TradeDate/text()').getstringval (LIKE v_str9),)
    XMLTYPE. Extract(value (a), ' Table/MaturityDate/text()').getstringval (LIKE v_str10),)
    XMLTYPE. Extract(value (a), ' Table/Kind/text()').getstringval (LIKE v_str11),)
    XMLTYPE. Extract(value (a), ' Table/C_Cpty_ShortName/text()').getstringval (LIKE v_str12),)
    XMLTYPE. Extract(value (a), ' Table/I_Cpty_ShortName/text()').getstringval (LIKE v_str13),)
    XMLTYPE. Extract(value (a), ' Table/FoldersGrp_ShortName/text()').getstringval (LIKE v_str14),)
    XMLTYPE. Extract(value (a), ' Table/Currencies_ShortName/text()').getstringval (LIKE v_str15),)
    XMLTYPE. Extract(value (a), ' Table/F_Folders_ShortName/text()').getstringval (LIKE v_str16),)
    XMLTYPE. Extract(value (a), ' Table/T_TypeOfInstr_ShortName/text()').getstringval (LIKE v_str17),)
    XMLTYPE. Extract(value (a), ' Table/Cu_Currencies_ShortName/text()').getstringval (LIKE v_str18),)
    XMLTYPE. Extract(value (a), ' Table/D_Amount/text()').getstringval (LIKE v_str19),)
    XMLTYPE. Extract(value (a), ' Table/D_Market/text()').getstringval (LIKE v_str20),)
    XMLTYPE. Extract(value (a), ' Table/D_Sensitivity/text()').getstringval (LIKE v_str21),)
    XMLTYPE. Extract(value (a), ' Table/L_Amount/text()').getstringval (LIKE v_str22),)
    XMLTYPE. Extract(value (a), ' Table/Column1/text()').getstringval (LIKE v_str23),)
    XMLTYPE. Extract(value (a), ' Table/D_IssueToMat/text()').getstringval (LIKE v_str24),)
    XMLTYPE. Extract(value (a), ' Table/D_SettlToMat/text()').getstringval (LIKE v_str25),)
    XMLTYPE. Extract(value (a), ' Table/Column2/text()').getstringval (LIKE v_str26),)
    XMLTYPE. Extract(value (a), ' Table/KdbTables_Id/text()').getstringval (LIKE v_str27),)
    XMLTYPE. Extract(value (a), ' Table/Cpty_Id/text()').getstringval (LIKE v_str28),)
    XMLTYPE. Extract(value (a), ' Table/CptyType/text()').getstringval (LIKE v_str29),)
    XMLTYPE. Extract(value (a), ' Table/LegalStatus/text()').getstringval (LIKE v_str30),)
    XMLTYPE. Extract(value (a), ' Table/Countries_ShortName1/text()').getstringval (LIKE v_str31),)
    XMLTYPE. Extract(value (a), ' Table/Column3/text()').getstringval (LIKE v_str32),)
    XMLTYPE. Extract(value (a), ' Table/Column4/text()').getstringval (LIKE v_str33),)
    XMLTYPE. Extract(value (a), ' Table/Column5/text()').getstringval (AS v_str34))
    TABLE
    (XMLSEQUENCE(Details.EXTRACT('/NewDataSet/Table'))
    ) a
    )
    LOOP

    insert into crmk_kplusdata
    (
    location, countriesgrp_id, countriesgrp_shortname, riskcountry,
    limitstypes_shortname, dealsgroup, kdbtables_displayname,
    dealid, tradedate, maturitydate, kind, c_cpty_shortname,
    i_cpty_shortname, foldersgrp_shortname, lt_currencies_shortname,
    f_folders_shortname, t_typeofinstr_shortname, cu_currencies_shortname,
    d_amount, d_market, d_sensitivity, l_amount, exhibition, d_issuetomat,
    limitsid, tableid, c_cpty_id, cptytype, d_settltomat, legalstatus,
    parentcountry, ratingriskcountry, ratingparentcountry
    )
    values
    (
    j.v_str1, j.v_str2, j.v_str3, j.v_str4,
    j.v_str5, j.v_str6, j.v_str7,
    j.v_str8, j.v_str9, j.v_str10, j.v_str11, j.v_str12,
    j.v_str13, j.v_str14, j.v_str15,
    j.v_str16, j.v_str17, j.v_str18,
    j.v_str19, j.v_str20, j.v_str21, j.v_str22, j.v_str23, j.v_str24, j.v_str25, j.v_str26,
    j.v_str27, j.v_str28, j.v_str29, j.v_str30, j.v_str31,
    j.v_str32, j.v_str33
    ) ;

    END LOOP;
    commit;

    V_RETURNMSG: = 'Data inserted successfully in KPLUS DATA';

    EXCEPTION WHEN OTHERS THEN
    ROLLBACK;
    V_RETURNMSG: = 'error in inserting DATA KPLUS' | SQLERRM;
    END;


    This is my XML:

    < NewDataSet > < Table > < location > IB < / location > < CountriesGrp_Id > 22444 < / CountriesGrp_Id > < CountriesGrp_ShortName > IND < / CountriesGrp_ShortName > < Countries_ShortName > IND < / Countries_ShortName > < LimitsTypes_ShortName > IBANK-AGG < / LimitsTypes_ShortName > < DealsGroup > derived < / DealsGroup > < KdbTables_DisplayName > Bond Deals < / KdbTables_DisplayName > < DealId > 19873 < / DealId > < TradeDate > 2002-02-20T 10: 39:24.2860000 + 05:30 < /. TradeDate > < MaturityDate > 2012-02-20T 10: 39:24.2860000 + 05:30 < / MaturityDate > < Type > U < / friendly > < C_Cpty_ShortName > UTIBAN-MUM < / C_Cpty_ShortName > < I_Cpty_ShortName > POWER-END < / I_Cpty_ShortName > < FoldersGrp_ShortName > IBANK-ALL < / FoldersGrp_ShortName > < Currencies_ShortName > INR < / Currencies_ShortName > < F_Folders_ShortName > IBSTCSL-PS < / F_Folders_ShortName > < T_TypeOfInstr_ShortName > BNDTAX < / T_TypeOfInstr_ShortName > < Cu_Currencies_ShortName > INR < / Cu_Currencies_ShortName > < D_Amount > 50000000 < / D_Amount > < D_Market > - 58006934.2465 < / D_Market > < D_Sensitivity > 13662.277390219413 < / D_Sensitivity > < L_Amount >-50000000 < / L_Amount > < C Column1 > < / Column1 > < D_IssueToMat > 3652 < / D_IssueToMat > < D_SettlToMat > 3652 < / D_SettlToMat > < Column2 > 0 < / Column2 > < KdbTables_Id > 97 < / KdbTables_Id > < Cpty_Id > 15226 < / Cpty_Id > < CptyType > B < / CptyType > < LegalStatus > HO < / LegalStatus > < IND Countries_ShortName1 > < / Countries_ShortName1 > < Column3 > 0 < / Column3 > < column4 > 0 < / column4 > < column 5 K > < / column 5 > < / Table > < / NewDataSet >

    Should be as simple as

    ....
    INSERT INTO crmk_kplusdata
       SELECT EXTRACTVALUE (t2.COLUMN_VALUE, 'Table/Location') location,
              EXTRACTVALUE (t2.COLUMN_VALUE, 'Table/CountriesGrp_Id') countriesgrp_id,
              EXTRACTVALUE (t2.COLUMN_VALUE, 'Table/CountriesGrp_ShortName') countriesgrp_shortname,
      ........
         FROM table (
                 XMLSEQUENCE (xmltype (v_xmlstr).EXTRACT ('NewDataSet/Table'))
              ) t2;
    .....
    
  • Insert a link on the xml report. The link must open a document (PDFS).

    Is it possible to insert a link in the report? The value would come from a sql query. The link when clicked on would open the pdf or doc.

    This is done through a href or by inserting a hyper dynamic link.

    Version 5.6.2 Release documentation reference how to insert a hyperlink. Not sure if this will work for me.
    I tried, but in literature, he States:

    >
    If your input XML data includes an item that contains a hyperlink, or a part of
    one, you can create dynamic hyperlinks when running. In the Type of file or Web page
    domain name of the dialog box insert hyperlink, enter the following syntax:
    {URL_LINK}
    where URL_LINK is the name of incoming data item.
    >

    However the dialog I get when I inserted the hyperlink does not have a place to enter the item name. In other words, there is no "TYPE of file or Web page" area that I see.

    Hi ashalon,

    I made this way in MS Word.
    1. create the placeholder for the value
    2. put highlight and make a hyperlink
    3. Enter the url in the address bar

    So if you have a complete hyperlink in the URL_LINK xml element you just enter {URL_LINK} in the address line. If you have only a part of the link, IE only a product name, you can enter 'http://www.oracle.com?product= {PRODUCT_NAME} ".

    I hope this helps.

    Concerning
    Chrissy

  • Unexpected LSX errors when inserting documents in the binary XML database schema

    Hi all

    When I have XML schema registries, if I put the GENTYPES = FALES. I also set xdb:storeVarrayAsTable = "fales.
    do I still have to put the xdb:SQLType = "XXXXXX" annotation in the .xsd file?

    When should I put GENTYPES = FALES, when should set GENTYPES = FALES = TRUE.

    Thank you.

    Cow.

    Published by: cow on December 20, 2010 18:11

    Published by: mdrake on December 29, 2010 21:11

    Changed the title to reflect the real issue at hand

    Filed bug 10419629

    Please open a tar with MoS, referencing this bug if you need a fix...

    M

  • Insertion of logo in the XML editor RTF model

    Dear members,

    I developed a RTF model. In this model, I inserted a dummy image. I have a right click on the image and the image of selected format option. Because I'm not able to see the web tab.

    Can someone help me please to solve this issue.

    I use Microsoft Office 2010 with the Oracle Applications 11.5.10.2

    Best regards.

    Select the image, you will get the menu format bar. Do not click on the format menu and go to the panel size, click the 'Alt text' tab.
    You can enter the URL here.

    I hope this helps.

  • Assign to any type payload (XML stream) a schema?

    Is any Posibility to BPEL?
    It can be like that to write this payload to a file and read it by assigning a schema. but I really don't won't do it in this way.

    Everything can help me out and thanks.

    Kind regards
    Kerr

    Hello Kerr,

    I don't know, if this applies to your problem because I've ever used any type til now, but I read on the assignment of a type by using the operation of a business to be divested . Perhaps it could be useful:

    http://download.Oracle.com/docs/CD/B31017_01/integrate.1013/b28981/manipdoc.htm#sthref873

    Kind regards
    Marco

Maybe you are looking for

  • iPhone 5, music

    Hello, guys. I'm new here, I signed up because I wanted to transfer music from PC to my iPhone 5, using USB and iTunes, as suggested, but it does not work. Does anyone have a tip?

  • The desktop icons show a little lock on them

    All my desktop icons have a small lock gold down left of the icon. How doI get rid of them? Help please

  • I have little Internet connection but LAN works

    I hunted for the answer; I'm close, but no cigar. A few facts: I use Win 7. All other devices on the router do not experience problems. The computer can see all devices on our network using wired connections and wireless. I ping Internet addresses (s

  • QDateTime in qml?

    Hello I was wondering how to import and use the QDateTime object in qml? Thank you!

  • List of "programs and features" Control Panel does not display some "details".

    I already have 'Last used' in the menu of details and the column IS showing on the list of programs. but the data is empty for all the programs.   I have a LOT of details added selected and all columns in the details chosen gave except this one (but