XML into multiple rows

I have an XML file to inset into multiple tables.
My file is like
<?xml version="1.0" encoding="ISO-8859-1"?>
<DCDS>
<CDS>
     <COD></COD>
     <COD_INT></COD_INT>
     <ULTIMA_MODIFICA></ULTIMA_MODIFICA>
     <TIP></TIP>
     <DEN></DEN>
     <CLS>
          <ID></ID>
          <DEN></DEN>
     </CLS>
     <FAC></FAC>
     <OBT>
     <![CDATA[
     ]]>
     </OBT>
     <PRF>
     <![CDATA[
     ]]>
     </PRF>
     <OCC>
     <![CDATA[
     ]]>
     </OCC>
     <ACC>
     <![CDATA[
     ]]>
     </ACC>
     <CUR>
          <ID></ID>
          <DEN></DEN>
               <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT></SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT></SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
          <DESCAMBITO></DESCAMBITO>
<SETT></SETT>     <CF></CF>
          <CFMIN></CFMIN>
          <CFMAX></CFMAX>
          <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
     <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
          <CF></CF>
          <CFMIN> </CFMIN>
          <CFMAX> </CFMAX>
          <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
          <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
               <CF></CF>
               <CFMIN> </CFMIN>
               <CFMAX> </CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
          <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
               <CF></CF>
               <CFMIN> </CFMIN>
               <CFMAX> </CFMAX>
               <TP></TP>
          </GRP>
               <GRP>
               <ID></ID>
                    <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
               <CF></CF>
               <CFMIN> </CFMIN>
               <CFMAX> </CFMAX>
               <TP></TP>
               </GRP>
     </CUR>
</CDS>
</DCDS>
In some cases, like <GRP> tag, I have to insert multiple rows in a table. I found the valueOf, but it extracts only the first value contained.
payment.amount := xpath.valueOf(curNode,'.');
Some tips?

I have an XML file to inset into multiple tables.
My file is like
<?xml version="1.0" encoding="ISO-8859-1"?>
<DCDS>
<CDS>
     <COD></COD>
     <COD_INT></COD_INT>
     <ULTIMA_MODIFICA></ULTIMA_MODIFICA>
     <TIP></TIP>
     <DEN></DEN>
     <CLS>
          <ID></ID>
          <DEN></DEN>
     </CLS>
     <FAC></FAC>
     <OBT>
     <![CDATA[
     ]]>
     </OBT>
     <PRF>
     <![CDATA[
     ]]>
     </PRF>
     <OCC>
     <![CDATA[
     ]]>
     </OCC>
     <ACC>
     <![CDATA[
     ]]>
     </ACC>
     <CUR>
          <ID></ID>
          <DEN></DEN>
               <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT></SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT></SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
               <DESCAMBITO></DESCAMBITO>
               <SETT>
               </SETT>
               <CF></CF>
               <CFMIN></CFMIN>
               <CFMAX></CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
          <DESCAMBITO></DESCAMBITO>
<SETT></SETT>     <CF></CF>
          <CFMIN></CFMIN>
          <CFMAX></CFMAX>
          <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
     <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
          <CF></CF>
          <CFMIN> </CFMIN>
          <CFMAX> </CFMAX>
          <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
          <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
               <CF></CF>
               <CFMIN> </CFMIN>
               <CFMAX> </CFMAX>
               <TP></TP>
          </GRP>
          <GRP>
               <ID></ID>
          <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
               <CF></CF>
               <CFMIN> </CFMIN>
               <CFMAX> </CFMAX>
               <TP></TP>
          </GRP>
               <GRP>
               <ID></ID>
                    <DESCAMBITO></DESCAMBITO>
          <SETT> </SETT>
               <CF></CF>
               <CFMIN> </CFMIN>
               <CFMAX> </CFMAX>
               <TP></TP>
               </GRP>
     </CUR>
</CDS>
</DCDS>
In some cases, like <GRP> tag, I have to insert multiple rows in a table. I found the valueOf, but it extracts only the first value contained.
payment.amount := xpath.valueOf(curNode,'.');
Some tips?

Similar Messages

  • Splitting comma seperated column data into multiple rows

    Hi Gurus,
    Please help me for solving below scenario. I have multiple value in single column with comma seperated values and my requirement is load that data into multiple rows.
    Below is the example:
    Source Data:
    Product         Size                                 Stock
    ABC              X,XL,XXL,M,L,S                 1,2,3,4,5,6
    Target Data:
    Product         Size                                 Stock
    ABC              X                                     1
    ABC              XL                                   2
    ABC              XXL                                 3
    ABC              M                                    4
    ABC              L                                      5
    ABC             S                                        6
    Which transformation we need to use for getting this output?
    Thanks in advance !

    Hello,
    Do you need to do this tranformation through OWB mapping only? And can you please tell what type of source you are using? Is it a flat file or a table?
    Thanks

  • I need to divide selected row into multiple rows when i navigate  ADF 11g

    Hi
    I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
    I need to divide selected row into multiple rows when i navigate to other page . Scenario - in first page i'm displaying some records with columns like empno , empstatus , empworkdepts ,curdepts
    Here empworkdepts gives the numeric number like no of departments work shifts 3 or 4 or 5. when i select any particular employee and fire next button to navigate next page.I have to divide the selected employee with same information into multiple times based on the empworkdepts value.
    empno empstatus empworkdepts curdept
    001 eds 2 TS
    002 hr 1 FO
    003 eds 4 TS
    *004 eds 3 TS*
    now i selected employee 004 , when i navigate to next page.
    Empno EmpStatus EmpWorkDepts CurDept
    004 eds 3 TS
    004 eds 3 TS
    004 eds 3 TS
    i did with java code in bean .but not stable .
    any help............
    thanks advance.............
    Edited by: user9010551 on May 5, 2010 10:48 PM
    Edited by: user9010551 on May 10, 2010 11:31 PM

    user9086775 wrote:
    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product     Sub Product          Name    Age
    New Car    Nissan                   Tom        49
    New Car    Nissan                   Jack         36
    Old Car      Audi                     Sam         24
    Old Car      Jaguar                  Pint          26
    Old Car      Audi                     Smith       41
    I need to be able to fetch the above data in the below fashion
    Product     Sub Product          Name    Age
    New Car
    Nissan
    Tom        49
    Jack        36
    Old Car     
    Audi            
    Sam        24
    Smith      41
    Jaguar                   Pint         26Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
    For example if you are in SQL Plus you can use the BREAK command.

  • Easy Question: How to split concatenated string into multiple rows?

    Hi folks,
    this might be an easy question.
    How can I split a concatenated string into multiple rows using SQL query?
    INPUT:
    select 'AAA,BBB,CC,DDDD' as data from dualDelimiter = ','
    Expected output:
    data
    AAA
    BBB
    CCC
    DDDDI'm looking for something kind of "an opposite for 'sys_connect_by_path'" function.
    Thanks,
    Tomas

    Here is the SUBSTR/INSTR version of the solution:
    SQL> WITH test_data AS
      2  (
      3          SELECT ',' || 'AAA,BBB,CC,DDDD' || ',' AS DATA FROM DUAL
      4  )
      5  SELECT  SUBSTR
      6          (
      7                  DATA
      8          ,       INSTR
      9                  (
    10                          DATA
    11                  ,       ','
    12                  ,       1
    13                  ,       LEVEL
    14                  ) + 1
    15          ,       INSTR
    16                  (
    17                          DATA
    18                  ,       ','
    19                  ,       1
    20                  ,       LEVEL + 1
    21                  ) -
    22                  INSTR
    23                  (
    24                          DATA
    25                  ,       ','
    26                  ,       1
    27                  ,       LEVEL
    28                  ) - 1
    29          )       AS NEW_STRING
    30  FROM    test_data
    31  CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(DATA,'[^,]','')) - 1
    32  /
    NEW_STRING
    AAA
    BBB
    CC
    DDDD

  • Split single row into multiple rows containing time periods

    Hi,
    I have a table with rows like this:
    id, intime, outtime
    1, 2010-01-01 00:10, 2010-01-3 20:00
    I would like to split this row into multiple rows, 1 for each 24hr period in the record.
    i.e. The above should translate into:
    id, starttime, endtime, period
    1, 2010-01-01 00:10, 2010-01-02 00:10, 1
    1, 2010-01-02 00:10, 2010-01-03 00:10, 2
    1, 2010-01-03 00:10, 2010-01-03 20:00, 3
    The first starttime should be the intime and the last endtime should be the outtime.
    Is there a way to do this without hard-coding the 24hr periods?
    Thanks,
    Dan Scott
    http://danieljamesscott.org

    Thanks for all the feedback, Dan.
    It appears that the respective solutions provided will give you: a) different resultsets and b) different performance.
    Regarding your 'truly desired resultset' you haven't answered all questions from my previous post (there are differences in the provided examples), but anyway:
    I found that using CEIL or ROUND makes quite a difference, using my 'simple 3 record testset' (30 records vs. 66 records got initially returned, that's less than half of the original). That's quite a difference. However, I must call it a day (since it's almost midnight) for now, so there's room for more optimizement and I haven't thoroughly tested.
    But this might hopefully make a difference performancewise when compared to my previous 'dreaded example':
    SQL> drop table t;
    Table dropped.
    SQL> create table  t as
      2  select 1 id, to_date('2010-01-01 00:10', 'yyyy-mm-dd hh24:mi') intime, to_date('2010-01-03 20:00', 'yyyy-mm-dd hh24:mi') outtime from dual union all
      3  select 2 id, to_date('2010-02-01 00:10', 'yyyy-mm-dd hh24:mi') intime, to_date('2010-02-05 20:00', 'yyyy-mm-dd hh24:mi') outtime from dual union all
      4  select 3 id, to_date('2010-03-01 00:10', 'yyyy-mm-dd hh24:mi') intime, to_date('2010-03-03 00:10', 'yyyy-mm-dd hh24:mi') outtime from dual;
    Table created.
    SQL> select id
      2  ,      max(intime)+level-1 starttime
      3  ,      case
      4           when level = to_char(max(t.outtime), 'dd')
      5           then max(t.outtime)
      6           else max(t.intime)+level
      7         end outtime
      8  ,      level period      
      9  from   t
    10  connect by level <= round(outtime-intime)
    11  group by id, level
    12  order by 1,2;
            ID STARTTIME           OUTTIME                 PERIOD
             1 01-01-2010 00:10:00 02-01-2010 00:10:00          1
             1 02-01-2010 00:10:00 03-01-2010 00:10:00          2
             1 03-01-2010 00:10:00 03-01-2010 20:00:00          3
             2 01-02-2010 00:10:00 02-02-2010 00:10:00          1
             2 02-02-2010 00:10:00 03-02-2010 00:10:00          2
             2 03-02-2010 00:10:00 04-02-2010 00:10:00          3
             2 04-02-2010 00:10:00 05-02-2010 00:10:00          4
             2 05-02-2010 00:10:00 05-02-2010 20:00:00          5
             3 01-03-2010 00:10:00 02-03-2010 00:10:00          1
             3 02-03-2010 00:10:00 03-03-2010 00:10:00          2
    10 rows selected.
    SQL> By the way: I'm assuming you're on 10g, is that correct?
    Can you give us some information regarding the indexes present on your table?

  • Urgent: How to break 1 Row into Multiple Rows

    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product Sub Product Name Age
    New Car Nissan Tom 49
    New Car Nissan Jack 36
    Old Car Audi Sam 24
    Old Car Jaguar Pint 26
    Old Car Audi Smith 41
    I need to be able to fetch the above data in the below fashion
    Product Sub Product Name Age
    New Car
    Nissan
    Tom 49
    Jack 36
    Old Car
    Audi
    Sam 24
    Smith 41
    Jaguar Pint 26
    Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!

    user9086775 wrote:
    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product     Sub Product          Name    Age
    New Car    Nissan                   Tom        49
    New Car    Nissan                   Jack         36
    Old Car      Audi                     Sam         24
    Old Car      Jaguar                  Pint          26
    Old Car      Audi                     Smith       41
    I need to be able to fetch the above data in the below fashion
    Product     Sub Product          Name    Age
    New Car
    Nissan
    Tom        49
    Jack        36
    Old Car     
    Audi            
    Sam        24
    Smith      41
    Jaguar                   Pint         26Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
    For example if you are in SQL Plus you can use the BREAK command.

  • Cats ESS view - into multiple rows when we release times or refresh them

    Dear ALL,
    We are using the record working times and when we enter the data for the week for 5 days each with 8 hours a day in one row in portal. Once we refresh or review that page it is resulting into multiple rows, like for 5 days five rows each row containing an entry for each day. how can we avoid this, we want all entries maintained into one row only.
    Help is appreciated.
    Thanks and Regs,
    Raj

    Made some changes in Data entry profiles

  • Please - immediate help needed parsing csv values into multiple rows

    Hello, we have a very immediate need to be able to parse out a field of comma separated values into individual rows. The following is an example written in SQL Server syntax which does not work in Oracle.
    The tricky part is that each ROUTES can be a different length, and each CSV can have a different number of routes in it.
    Here is an example of the table ("Quotes") of CSV values I want to normalize:
    TPNUMBER ROUTES
    1001 1, 56W, 18
    1002 2, 16, 186, 28
    Here is an example of what I need it to look like:
    TPNUMBER ROUTES
    1001 1
    1001 56W
    1001 18
    1002 2
    1002 16
    1002 186
    1002 28
    Here is the "Tally" table for the query below:
    ID
    1
    2
    3
    4
    5
    6
    7
    And finally, here is the query which parses CSV values into multiple rows but which does not work in Oralce:
    SELECT TPNUMBER,
    NullIf(SubString(',' + ROUTES + ',' , ID , CharIndex(',' , ',' + ROUTES + ',' , ID) - ID) , '') AS ONEROUTE
    FROM Tally, Quotes
    WHERE ID <= Len(',' + ROUTES + ',') AND SubString(',' + Phrase + ',' , ID - 1, 1) = ','
    AND CharIndex(',' , ',' + ROUTES + ',' , ID) - ID > 0
    It may be necessary to use a cursor to loop through the CSV table and process each row (a loop within another loop...) but this is beyond my comprehesion of PL/SQL.
    Many thanks in advance for your advice/help.
    apk

    Not sure what you are trying to do with the last step, but this should work for the first part. I assume you would use sqlldr but I just did inserts instead. You might need more than 5 "routes" in the csv. You could put some reasonable max on that number of columns:
    SQL>create table t_csv
    2 (TPNUMBER varchar2(20),
    3 ROUTE_1 VARCHAR2(5),
    4 ROUTE_2 VARCHAR2(5),
    5 ROUTE_3 VARCHAR2(5),
    6 ROUTE_4 VARCHAR2(5),
    7 ROUTE_5 VARCHAR2(5),
    8 ROUTE_6 VARCHAR2(5) );
    Table created.
    SQL>INSERT INTO t_csv (TPNUMBER,ROUTE_1,ROUTE_2) values( '1001 1', '56W', '18' );
    1 row created.
    SQL>INSERT INTO t_csv (TPNUMBER,ROUTE_1,ROUTE_2,ROUTE_3) values( '1002 2', '16', '186', '28');
    1 row created.
    SQL>create table t_quotes(
    2 tpnumber NUMBER,
    3 routes VARCHAR2(5));
    Table created.
    SQL>DECLARE
    2 L_tpnumber NUMBER;
    3 L_route VARCHAR2(5);
    4 begin
    5 for rec in (select * from t_csv) loop
    6 L_tpnumber := SUBSTR(rec.tpnumber,1,INSTR(rec.tpnumber,' ')-1);
    7 L_route := SUBSTR(rec.tpnumber,INSTR(rec.tpnumber,' ')+1);
    8 insert into t_quotes values( L_tpnumber, l_route );
    9 if rec.route_1 is not null then
    10 insert into t_quotes values( L_tpnumber, rec.route_1 );
    11 end if;
    12 if rec.route_2 is not null then
    13 insert into t_quotes values( L_tpnumber, rec.route_2 );
    14 end if;
    15 if rec.route_3 is not null then
    16 insert into t_quotes values( L_tpnumber, rec.route_3 );
    17 end if;
    18 if rec.route_4 is not null then
    19 insert into t_quotes values( L_tpnumber, rec.route_4 );
    20 end if;
    21 if rec.route_5 is not null then
    22 insert into t_quotes values( L_tpnumber, rec.route_5 );
    23 end if;
    24 end loop;
    25 end;
    26 /
    PL/SQL procedure successfully completed.
    SQL> select tpnumber, routes from t_quotes;
    TPNUMBER ROUTE
    1001 1
    1001 56W
    1001 18
    1002 2
    1002 16
    1002 186
    1002 28
    7 rows selected.

  • How do I divide a list in one cell into multiple rows?

    I have copied lists of data from a website - some lists pasted as I want them (in individual rows), but others pasted the list in one row.  Is there an easy way to split a list in a single cell into multiple cells so ultimately I can sort all the rows?  I've tried "split the selected cells into rows" in the inspector, but it's not working... seems like it's creating another column instead (?).  Any help would be amazing.

    K,
    I find that Pages has the friendliest Find and Replace dialog, so when I need to swap around the delimiters I go straight to Pages and do the fixes there. Replace whatever is there between columns in the original content with Tab characters and replace whatever is there now for delimiting the rows with the Return character. Since it's sometimes difficult to tell what has been used, just copy it from the content and Paste into the Find field. Choose the Tab or Return character from the Replace drop down menu.
    When you have it all fixed up, then paste into Numbers.
    Jerry

  • How to create XML from multiple rows in a table?

    Hi All,
    I have a table where it has multiple rows as below which I need to send as a XML.. can any one let me know how to create?
    Table:
    PRDID,NAME,DESCRIPTION,SUPPLIER,PRICE
    2012,AAA,ADESC,SUPPLIER1,1.8
    2012,AAA,ADESC,SUPPLIER2,2.5
    XML should be :
    <ROOT>
    <PRDID>2012</PRDID>
    <NAME>AAA</NAME>
    <DESCRIPTION>ADESC</DESCRIPTION>
    <PRICE>
    <REGION>SUPPLIER1</REGION>
    <PRICE>1.8</PRICE>
    <REGION>SUPPLIER2</REGION>
    <PRICE>2.5</PRICE>
    </PRICE>
    </ROOT>
    Thanks
    Rajeev

    Hi
    This white paper shows how to do it - http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/101c974c-11f9-2b10-4da5-cd350b7eeda0
    Michael

  • XML into multiple tables

    This is my first thread so I hope I have formatted my request appropriately...
    If I have a simple XML doc with several records (see below) what is the best / easiest way to insert the data into multiple tables (Oracle 10g Release 1)?
    For example 3 tables:
    PATIENT table (CLAIMID, FNAME, LNAME, HEALTHNUM)
    ADDRESS table (CLAIMID, STREET, CITY, PROVINCE)
    SERVICE table (CLAIMID, SERVICE, ADMITDATE, DEPARTDATE)
    <?xml version="1.0"?>
    <CLAIMS>
    <CLAIM>
    <CLAIMID>1</CLAIMID>
    <FNAME>Oscar</FNAME>
    <LNAME>Grouch</LNAME>
    <HEALTHNUM>1234657890</HEALTHNUM>
    <STREET>123 Sesame Street</STREET>
    <CITY>Sesameville</CITY>
    <PROVINCE>ON</PROVINCE>
    <SERVICE>Heart Surgery</SERVICE>
    <ADMITDATE>2007-06-05</ADMITDATE>
    <DEPARTDATE>2007-06-11</DEPARTDATE>
    </CLAIM>
    <CLAIM>
    <CLAIMID>2</CLAIMID>
    <FNAME>Poppa</FNAME>
    <LNAME>Smurf</LNAME>
    <HEALTHNUM>0987654321</HEALTHNUM>
    <STREET>44 Blue Street</STREET>
    <CITY>Smurfville</CITY>
    <PROVINCE>ON</PROVINCE>
    <SERVICE>Lung Transplant</SERVICE>
    <ADMITDATE>2007-05-28</ADMITDATE>
    <DEPARTDATE>2007-06-04</DEPARTDATE>
    </CLAIM>
    ...more <CLAIM> records
    </CLAIMS>
    I can import the XML document into an XMLType column but don't know where to go from there...
    The extractValue method seems to work only when there is a single claim record in the XML document but a typical document will contain several hundred claims.
    Thanks in advance,
    M Kent

    Use the Oracle Berkeley DB XML to store the XML document in a embedded xml database. To store in the Oracle 10g database use XSU. With XSU an XML document may also be stored in multiple tables.
    http://download-east.oracle.com/docs/cd/A97329_03/web.902/a88894/adx07xsu.htm#1016732

  • Convert one record row into multiple rows

    Hi,
       I have small requirement.I have selected one data base record into an internal table.Now internal table has 1 record i.e 1 row(ex: 10 columns). Now i will convert this single row record into multiple  records i.e 10 rows( 10 columns wil; be converted into 10 rows). How i will convert this. Please give me any idea on this.
    Regards
    Geetha

    Hi Geetha,
    Search SCN using keyword,  " convert Rows into columns" or vice versa,,,
    U will get more answers & solutions,
    Look at Some of the Previous threads....
    Re: How to create a structure of itab as rows as colums and columns rows dy
    Re: Transpose rows and columns
    CONVERT ROWS INTO COLUMNS IN INTERNAL TABLE
    Convert Internal table Rows into columns of another internal table
    how to convert columns of an internal table to rows of another internal tab.
    Convert Columns into Rows (internal tables) - Urgent Help Pleasse..
    converting columns to rows
    Thanks & regards,
    Dileep .C

  • Associate Table1_PK into multiple rows in Table2

    Hi,
    I have 2 tables... TableOne and TableMany. The values for input are all on the same page. I'm trying to achieve... Inserting the TableOne values (no problem - created a process for insert)... once this is done I want to insert multiple rows into TableMany which associates the PK from TableOne insert to multiple values selected from a Multiselect List. I have setup the coding to obtain the individual elements in the multiselect list but don't know the best way to obtain the PK.
    Ideally I'd be able to set the ProcessInsertTableOne sequence to lower than ProcessInsertTableMany and store the PK (created by table PK sequence trigger) into a page item and then use this in the 2nd insert process? Been trying to work around this but still a bit novice in SQL and newbie to ApEx.
    Any help or guidance in this regard would be appreciated.
    Thanks.
    Rory

    You should use 2 pages. Input into master record on one page then put a link in and branch to another page containing the details.
    Gus

  • Split XML into multiple records

    Hi All,
    I have to split an XML field from a data type into multiple records on the target side.
    For eg: If the source XML string is something like this:
    <XML_STRING>
    <Data>
       <name>abc</name>
       <place></place>
             <addr1> </addr1>
             <addr2></addr2>
        </place>
       <name>xyz<name>
       <place>
             <addr1></addr1>
             <addr2></addr2>
         </place>
    </Data>
    </XML_STRING>
    Since the above XML string has two records in it (each record includes name and place), I would like to split those two into two separate records in the target structure and send it to ECC.
    How can I achieve this in PI mapping. Here in this case I cannot even differentiate between <> </> to split the messages since a single records might have multiple sub nodes in it. It is only believed that when "<name>" repeats again in the XML that would be a start of new record. Based upon that I need to split the records.
    Thanks in advance!!

    Hi Shweta,
    Minor correction is required for you source structure. Please follow Amit or Vila suggestion for content conversion.
    Did mapping as per your requirement. Please find the screen shot below. Please note the structure and cardinality of the element and node field.
    Hope result is as per your requirement.
    Regards
    Jitender

  • 1 row into multiple rows

    I have a table time_entries
    create table time_entries
    (employee_id integer,
    start_date date,
    end_date date,
    CONSTRAINT pk_time_entries PRIMARY KEY (employee_id, start_date))Suppose I have one row in this table (dates in yyyy-mm-dd format):
    employee_id, start_date, end_date
    1, 2012-08-27, 2012-09-02
    As you can see the difference between the dates is 7 days. I want to write a query so that each day has its own row, i.e. I want to write a query which translates the above 1 row into 7 rows. This is the result set I want:
    employee_id, start_date, end_date
    1, 2012-08-27, 2012-08-27
    1, 2012-08-28, 2012-08-28
    1, 2012-08-29, 2012-08-29
    1, 2012-08-30, 2012-08-30
    1, 2012-08-31, 2012-08-31
    1, 2012-09-01, 2012-09-01
    1, 2012-09-02, 2012-09-02
    Is it possible to do it in one select statement?
    Edited by: srhcan on Aug 17, 2012 4:26 PM
    Edited by: srhcan on Aug 17, 2012 4:26 PM

    WITH t
         AS (SELECT 1 id,
                    TO_DATE ('2012-08-27', 'yyyy-mm-dd') start_date,
                    TO_DATE ('2012-09-02', 'yyyy-mm-dd') end_date
               FROM DUAL
             UNION ALL
             SELECT 2 id,
                    TO_DATE ('2012-10-27', 'yyyy-mm-dd') start_date,
                    TO_DATE ('2012-11-02', 'yyyy-mm-dd') end_date
               FROM DUAL)
    SELECT id, start_date, end_date
      FROM t
    MODEL
       PARTITION BY (id)
       DIMENSION BY (0 d)
       MEASURES (start_date, end_date, end_date stop)
       RULES
          ITERATE (10000) UNTIL start_date[ITERATION_NUMBER] = stop[0]
          (start_date [ITERATION_NUMBER] = start_date[0] + ITERATION_NUMBER,
          end_date [ITERATION_NUMBER] = start_date[0] + ITERATION_NUMBER)
    ID     START_DATE     END_DATE
    1     8/27/2012     8/27/2012
    1     8/28/2012     8/28/2012
    1     8/29/2012     8/29/2012
    1     8/30/2012     8/30/2012
    1     8/31/2012     8/31/2012
    1     9/1/2012     9/1/2012
    1     9/2/2012     9/2/2012
    2     10/27/2012     10/27/2012
    2     10/28/2012     10/28/2012
    2     10/29/2012     10/29/2012
    2     10/30/2012     10/30/2012
    2     10/31/2012     10/31/2012
    2     11/1/2012     11/1/2012
    2     11/2/2012     11/2/2012

Maybe you are looking for