Loading multiple tables from one xml-file

I've got one xml-file containing information which should be loaded into multiple database tables. How can I do that?

Please use XSLT to tranform to XML file with XSU recognized format and separated for different table input.
You may refer to Example in book "Building Oracle XML Applications".
null

Similar Messages

  • Loading multiple data from a XML file?

    Hi,
    I'm having trouble loading multiple data from the same XML file. In this XML file I have a list of dishes I want to add into a menu. So, how can I load multiple data from different branches of the XML file into my text fields?
    Thanks in advance,
    Rafael Carignato

    I'm not quite sure what you are trying to do.  I have this working with a .JSON file that loads "multiple" date into "multiple" fields in Edge - Is that what you mean?
    Here's an example:
    $.getJSON('slides.json', function(data) {
              for(var i=0;  i<data.length;  i++)
                                  var s = sym.createChildSymbol("slide", "stage");
                                  s.$("photo").css({"background-image":"url('"+data[i].image+"')"});
                                  s.$("title").html(data[i].title);
                                  s.$("price").html(data[i].price);
                                  s.getSymbolElement().css({"position":"absolute",
                                                      "left": i*225+50+"px",
                                                      "top":"100px"});
    Each name above (photo, title, price) has an element on the stage (or in my case, a symbol) and my .JSON file has has a "branch" for each of these:
    "image" : "images/7783.jpg",
    "title" : "SNOCONUTS",
    "price" : "12.00"
    Hope that helps...
    James

  • SQL Loader to Load Multiple Tables from Multiple Files

    Hi
    I wish to create a control file to load multiple tables from multiple files
    viz.Emp.dat into emp table and Dept.dat into Dept table and so on
    How could I do it?
    Can I create a control file like this:
    OPTIONS(DIRECT=TRUE,
    SKIP_UNUSABLE_INDEXES=TRUE,
    SKIP_INDEX_MAINTENANCE=TRUE)
    UNRECOVERABLE
    LOAD DATA
    INFILE 'EMP.dat'
    INFILE 'DEPT.dat'
    INTO TABLE emp TRUNCATE
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    (empno,
    ename,
    deptno)
    INTO TABLE dept TRUNCATE
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    (deptno,
    dname,
    dloc)
    Appreciate a Quick Reply
    mailto:[email protected]

    Which operating system? ("Command Prompt" sounds like Windows)
    UNIX/Linux: a shell script with multiple calls to sqlldr run in the background with "&" (and possibly nohup)
    Windows: A batch file using "start" to launch multiple copies of sqlldr.
    http://www.pctools.com/forum/showthread.php?42285-background-a-process-in-batch-%28W2K%29
    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true
    Edited by: Brian Bontrager on May 31, 2013 4:04 PM

  • Export multiple tables into one flat file

    I have data in multiple tables on a processing database that I need to move up to a production database. I want to export the data into a flat file, ftp it to the production server and have another job pick up the file and process it. I am looking for
    design suggestions on how to get multiple tables into one flat file using SSIS?
    Thank You.

    Hey,
    Without a bit more detail, as per Russels response, its difficult to give an exact recommendation.
    Essentially, you would first add a data flow task to your control flow.  Create a source per table, then direct the output of each into an union all task.  The output from the union all task would then be directed to a flat file destination.
    Within the union all task you can map the various input columns into the appropriate outputs.
    If the sources are different, it would probably be easiest to add a derived column task in-between the source and the union all, adding columns as appropriate and setting a default value that can be easily identified later (again depending on your requirements).
    Hope that helps,
    Jamie

  • Add to Multiple Tables from One Page

    Hello,
    I am building an application that handles hardware inventory (APEX 4.0). I have an input page that adds data to two or more tables all at once. The page has two forms on it that point to two separate tables. However when I try to run the page, it fails and returns an error:
    ORA-06550: line 1, column 437: PL/SQL: ORA-00904: "ORH_LAST_UPDATE_DATE": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
         Error      Unable to process row of table IDD_ID_DATA.
    So far as i can see within the App, that column is not at issue (I am not even doing anything to it and it is nullable). I have looked into the App itself as well as doing some online research but have found nothing helpful...
    So my question is this: Is it possible to add to multiple tables from one page? If so how do I do it?
    I am new to APEX so any help would be greatly appreciated!

    UPDATE:
    I received an email from the APEX Support Team:
    "The simple answer is that you will need to manually code the DML (and query) processes if you wish to maintain multiple tables from one page (There is a limit of one table when using the built-in processes).
    In order to do this I suggest you delete the processes generated by the wizards and create PL/SQL processes with insert, update, delete statements as necessary. Such coding is not difficult but is more time consuming than when you can use built-in processes."
    I have been playing around with PL/SQL code and the end result is this:
    begin
         INSERT INTO table1
         VALUES(
              :P2_Item_Field1,
              :P2_Item_Field2);
         INSERT INTO table2
         VALUES(
              :P2_Item_Field1,
              :P2_Item_Field2);
    end;
    I used this code in a custom PL/SQL Process in the Processing>Processes section of Page Processing and it seems to work fine now. The only downside to this method is if the name of a Page Item is changed the code will also have to be changed. Other than that i have had no problems.

  • Load multiple parts of an XML file into one dynamic Text Field

    Hi I am trying to load text from an external XML file into a dynamic text box. I have so far managed to load single parts of the XML file into a dynamic text field. I now want to be able to load different parts of the XML file (something similar to a string with appendText) into the same text Field.
    I have so far managed to achive this using the String and append text properties, but would like to use XML file to do it instead.
    Any tips please?
    Thanks

    In essence you can just do:
    TextField.text = XML.node1 + XML.node2;

  • Need to insert values into a table from a XML file

    Hi,
    I'm an Oracle 9i/10g DBA with quite a few years experience, but I'm new to XML and dealing with it in database terms. I've been given a project that entails pulling XML values out of a file (or 100's of them) and storing them in the database so that they are searchable by end-users. The project is classified as secret so I'm unable to upload the specific XML or any info relating to the structire of the XML or the table I will use to insert the values into - sorry!! So, I've created an XML file with a similar structure to help people understand my predicament.
    The end-users only need to search on a subset of the total amount of columns from the table I'll insert data into, although the XML file has a lot more, so I dont need to store the other values - but I will need to store the name of the XML file (or a pointer to it so I know what XML file a particular set of values belong to) in another column of the table along with its associated values.
    I've been using the XMLTABLE function with some degree of success, although I had better succes using the XMLSEQUENCE function. However, I found out this is deprecated in 10g and replaced with XMLTABLE, so I guess it's better if I use this in case we ever need to upgrade to 11g.
    The main problem I've been having is that some elements in the XML files have multiple values for the one record when all the other records are the same. In terms of storing this in the database, I guess it would mean inserting multiple rows in the table for each element where the value differs. Here is a dumbed down XML file similar to what I've got along with the other SQL I've used:
    +<?xml version="1.0" encoding="UTF-8"?>+
    +<House>+
    +<Warehouse>+
    +<WarehouseId>1</WarehouseId>+
    +<WarehouseName>+
    +<Town>Southlake</Town>+
    +<State>Texas</State>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>25000</Area>+
    +<Docks>2</Docks>+
    +<DockType>Rear load</DockType>+
    +<WaterAccess>true</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Street</Parking>+
    +<VClearance>10</VClearance>+
    +</Warehouse>+
    +<Warehouse>+
    +<WarehouseId>2</WarehouseId>+
    +<WarehouseName>+
    +<Town>Poole</Town>+
    +<State>Dorset</State>+
    +</WarehouseName>+
    +<WarehouseName>+
    +<Town>Solihull</Town>+
    +<County>West Midlands</State>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>40000</Area>+
    +<Docks>5</Docks>+
    +<DockType>Rear load</DockType>+
    +<WaterAccess>true</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Bay</Parking>+
    +<VClearance>10</VClearance>+
    +</Warehouse>+
    +<Warehouse>+
    +<WarehouseId>3</WarehouseId>+
    +<WarehouseName>+
    +<Town>Fleet</Town>+
    +<County>Hampshire</County>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>10000</Area>+
    +<Docks>1</Docks>+
    +<DockType>Side load</DockType>+
    +<WaterAccess>false</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Bay</Parking>+
    +<VClearance>20</VClearance>+
    +</Warehouse>+
    +</House>+
    CREATE TABLE xmltest OF XMLTYPE;
    INSERT INTO xmltest
    VALUES(xmltype(bfilename('XML_DIR', 'test.xml'), nls_charset_id('AL32UTF8')));
    Consequently, I need to...
    1) Retrieve the results from the XML file for all 3 warehouses where multiple values for the same sub-element are shown as 2 rowsthe result set. (I am guessing there will be 4 rows returned as warehouse sub-2 has 2 different elements for <WarehouseName>.
    2) Build a case statement into the query so that regardless of the sub-element name (i.e State or County), it is returned into the 1 column, for instance County.
    So, if I run a query similar to the following...
    select y.WarehouseId, y.Town, y.County, y.Area
    from xmltest x, xmltable('/House/Warehouse' .......
    I would like to get results back like this...
    ID Town County Area
    1 Southlake Texas 25000
    2 Poole Dorset 40000
    2 Solihull West Midlands 40000
    3 Fleet hampshire 10000
    Sorry for the non-formatting but I hope this all makessense to someone out there with what I'm trying to do.
    I appreciate any help whatsoever because, as i said before, I'm totally new to XML and trying to read the vast amount of information there is out there on XML is all a bit daunting.
    Many thanks in advance,
    Shaun.

    Hi again,
    Thanks for keeping the post open for me. I've had a look at the post illustrating the XFileHandler package, and tried to alter it to make it fit with my XML files. To help explain things, my XML file looks like this:
    <?xml version="1.0"?>
    <!DOCTYPE  CMF_Doc SYSTEM "CMF_Doc.dtd">
    <House>
        <Warehouse>
        <WarehouseId>1</WarehouseId>
        <WarehouseName>
           <Town>Southlake</Town>
           <State>Texas</State>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>House
        <WarehouseId>2</WarehouseId>
        <WarehouseName>
           <Town>Poole</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Solihull</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>40000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>3</WarehouseId>
        <WarehouseName>
           <Town>Fleet</Town>
           <County>Hampshire</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>
    <?xml version="1.0" encoding="UTF-8"?>
    <House>
        <Warehouse>
        <WarehouseId>4</WarehouseId>
        <WarehouseName>
           <Town>Dallas</Town>
           <State>Texas</State>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>5</WarehouseId>
        <WarehouseName>
           <Town>Dorchester</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Solihull</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>40000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>6</WarehouseId>
        <WarehouseName>
           <Town>Farnborough</Town>
           <County>Hampshire</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>
    <?xml version="1.0" encoding="UTF-8"?>
    <House>
        <Warehouse>
        <WarehouseId>7</WarehouseId>
        <WarehouseName>
           <Town>Southlake</Town>
           <State>Texas</State>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>8</WarehouseId>
        <WarehouseName>
           <Town>Bournemouth</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Shirley</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>30000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>9</WarehouseId>
        <WarehouseName>
           <Town>Clapham</Town>
           <County>London</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>And the XFilehandler package looks like this (I'm just trying to do a simple select only on WarehouseId & WaterAccess for the time being to keep things simple):
    create or replace package XFileHandler as
      TYPE TRECORD IS RECORD (
        WID     NUMBER(2)
      , WACCESS VARCHAR2(5)
      type TRecordTable is table of TRecord;
      function getRows (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipelined;
    end;
    create or replace package body XFileHandler is
      function getRows (p_directory in varchar2, p_filename in varchar2)
       return TRecordTable pipelined
      is
        nb_rec          number := 1;
        tmp_xml        clob;
        tmp_file         clob;
        rec               TRecord;
      begin
        DBMS_LOB.CREATETEMPORARY(TMP_FILE, TRUE);
        tmp_file := dbms_xslprocessor.read2clob(p_directory, p_filename);
        LOOP
          tmp_xml := regexp_substr(tmp_file, '<\?xml[^?]+\?>\s*<([^>]+)>.*?</\1>', 1, nb_rec, 'n');
          exit when length(tmp_xml) = 0;
          --dbms_output.put_line(tmp_rec);
          nb_rec := nb_rec + 1;
        select y.WID, y.WACCESS
        into rec.WID, rec.WACCESS
        from xmltable('/House' passing xmltype(tmp_xml)
                      columns WID NUMBER(2) PATH 'Warehouse/WarehouseId',
                                  WACCESS VARCHAR2(5) PATH 'WaterAccess') y;
          pipe row ( rec );
        end loop;
        dbms_lob.freetemporary(tmp_file);
        return;
      end;
    end;Now, when I run the query:
    select * from table(XFileHandler.getRows('XML_DIR', 'XFileHandler_test.xml'));I get the error: ORA-00600: internal error code, arguments: [17285], [0x5CFE8DC8], [4], [0x45ABE1C8], [], [], [], []
    I had a look in the dump file for anything obvious, but nothing really stands out. Is there anything obvious in my code that I'm missing or something else which you may think could be causing this error, e.g in the regular expression regexp_substr?
    Many thanks,
    Shaun.

  • SQL Loader : Loading multiple tables using same ctl file

    Hi ,
    We tried loading multiple tables using the same ctl file but the data was not loaded and no errors were thrown.
    The ctl file content is summarised below :
    LOAD DATA
    APPEND INTO TABLE TABLE_ONE
    when record_type ='EVENT'
    TRAILING NULLCOLS
    record_type char TERMINATED BY ',' ,
    EVENT_SOURCE_FIELD CHAR TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_DATE DATE "YYYY-MM-DD HH24:MI:SS" TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_COST INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_ATTRIB_1 CHAR TERMINATED BY ',' ENCLOSED BY '"',
    VAT_STATUS INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    ACCOUNT_REFERENCE CONSTANT 'XXX',
    bill_date "to_date('02-'||to_char(sysdate,'mm-yyyy'),'dd-mm-yyyy')",
    data_date "trunc(sysdate)",
    load_date_time "sysdate"
    INTO TABLE TABLE_TWO
    when record_type ='BILLSUMMARYRECORD'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    NET_TOTAL INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE BILL_BKP_ADJUSTMENTS
    when record_type ='ADJUSTMENTS'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    ADJUSTMENT_NAME CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE BILL_BKP_CUSTOMERRECORD
    when record_type ='CUSTOMERRECORD'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    GENEVA_CUSTOMER_REF CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE TABLE_THREE
    when record_type ='PRODUCTCHARGE'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    PROD_ATTRIB_1_CHRG_DESC CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    Has anyone faced similar errors or are we going wrong somewhere ?
    Regards,
    Sandipan

    This is the info on the discard in the log file :
    Record 1: Discarded - failed all WHEN clauses.
    Record 638864: Discarded - failed all WHEN clauses.
    While some of the records were loaded for one table.
    Regards,
    Sandipan

  • How to load a variable from an XML file?

    I need to use an XML file so I can update one variable every
    once in a while.
    Let's say I want to load Variable "foofie" into a flash
    movie, and the XML says that "foofie" is 11.
    What code do I put in my flash file to read what 'var foofie'
    is from an XML, and what do I put in the XML so I can frequently
    update what number is stored in 'foofie'
    Thanks!

    look up XML.load(url) in flash help, it's fairly simple
    in the xml you put, for example
    <foofie>11</foofie>
    if foofie is in a database or some other dynamic place,
    (which I assume, since you want to frequently update to its value)
    you need to write a script, in php for example, that returns the
    desired xml data

  • ASC 2.0 ant - does not load compiler constants from config.xml files

    Constants added to the mxmlc task with a config xml file do not work.
    Below, the CONFIG::debug and CONFIG::release constants will compile, but the one defined in the config-common.xml file (CONFIG::pi) does not.
    Portion of an ant macro:
    <mxmlc
    file="@{source.dir}/@{source.file}"
    output="@{output.dir}/@{project.name}.@{output.extension}"
    debug="@{debug}"
    target-player="@{target-player}"
    accessible="@{accessible}"
    use-network="@{use-network}"
    swf-version="@{swf.version}"
    inline="@{inline}"
    default-frame-rate="@{frameRate}"
    >
    <default-size width="@{width}" height="@{height}" />
    <source-path path-element="@{source.dir}" />
    <define name="CONFIG::debug" value="@{debug}"/>
    <define name="CONFIG::release" value="!CONFIG::debug"/>
    <load-config filename="config-common.xml" />
    <load-config filename="config-as-beta.xml" />
    <load-config filename="@{load-config}" />
    <arguments />
    </mxmlc>
    contents of config-common.xml:
    <flex-config>
    <compiler>
    <define append="true">
    <name>CONFIG::pi</name>
    <value>3.1415926535897932384626433832795</value>
    </define>
    </compiler>
    </flex-config>
    Compiling a ".as" file with something something like "trace(CONFIG::pi);" will result in "Error: Can not resolve config constant: 'pi'" with the ant macro.
    Using the Flash Builder 4.7 compiler with "Addition compiler arguments" set to "-define+=CONFIG::debug,true -define+=CONFIG::release,false -load-config+=config-common.xml -inline" does not produce the error. 

    I'm not sure I added the bug to the right place anymore.  It's been added to bugbase.adobe.com under AIR 3.4, but  I'm not sure if that covers the actionscript compiler 2 or not because I found another bug tracker at bugs.adobe.com.  The actual bug is here: https://bugbase.adobe.com/index.cfm?event=bug&id=3339017
    Does anyone know where to post bugs for the actionscript compiler 2.0?

  • Insert/update multiple tables from one form.

    I'm working on an app. that requires the user to fill out a form. The contents from the form is then used to either insert new records or update existing records in multiple tables. Is that possible? Can someone give a details example?

    You should create a form like you would create it having one table. Use row_id as primary key. The rest of the process are done by the triggers - those will take care of updating the right table depending which column was hit.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Count number rows in multiple tables from one query

    Hi
    I was wondering if its possible to have a single query return the number of lines in multiple tables, for example i have the tables
    foo1
    pk_foo1
    and
    foo2
    pk_foo2
    They are not joined together by any contraints. So the pseudo code for the query would be something like
    SELECT numrows(pk_foo1), numrows(pk_foo2) FROM foo1, foo2
    Thanks!

    without a join you get a cartesian product for the query:
    SQL> select count(d.deptno),count(e.deptno)
      2  from dept d,emp e
      3  /
    COUNT(D.DEPTNO) COUNT(E.DEPTNO)
                105             105so you need to do a bit of trickery
      1  select a.cnt,b.cnt
      2  from
      3  ( select count(d.deptno) cnt from dept d ) a,
      4* ( select count(e.deptno) cnt from emp e) b
    SQL> /
           CNT        CNT
             7         15
    SQL> select count(*) from dept;
      COUNT(*)
             7
    SQL> select count(*) from emp;
      COUNT(*)
            15

  • Multiple Target from an XML file problem

    I've an XLM file from which I import (using a pluggable mapping generated from xml_etl_ulils) data into a table.
    I need to execute some controls and log errors on these data.
    I created a splitter to split correct data (and put them into the table) and bad data (to log).
    However the generated mapping goes into an error because it tries to read 2 times the same XML data.
    The only way I found is to put all data (good and bad) into a temporary table and then apply the splitter to move data from that table to the targets.
    However that is not a clean solution because I need to have and manage 2 tables for each real table.
    Any clever suggestion ?
    Tks
    Tullio

    What is the exact error you get (what db version also), could you post a simplified version of the SQL which fails also? I have splitter based maps that successfully read from file via the XMLType(bfilename....) style code and insert into multiple targets, I did this on 11g though.
    Cheers
    David

  • Multiple IDOCs from one Flat file

    HI Gurus,
    Sender file is of such format
    Header1,Item1 details
    Header1,Item2 Details
    Header2, Item1 Details
    Header2,item2 Details
    Header3, Item1 Details
    I need to map this file format to IDOC strucutre, In Header there is a filed which is the Key value to identify the change in header.
    Eg: Order Number is the field in the following file which identifies the change in header: First three fields are header details and following are the item details:
    ABC,ON1,22,Item1,XX
    ABC,ON1,33,Item2,FF
    ABC,ON2,44,Item1,MM
    ABC,ON3,66,Item1,LL
    How would be the Data type strcuture to capture this type of falt file strcuture and FCC parameters?
    I need to send a single IDOC per one header with multiple Items. is it possible to achieve?
    Thanks
    Rajeev

    Hi Satish,
    Do we need to do some configuration  to produce 3 IDOCs from the below strcuture?
    ABC,ON1,22,Item1,XX
    ABC,ON1,33,Item2,FF
    ABC,ON2,44,Item1,MM
    ABC,ON3,66,Item1,LL
    From the above structure 3 IDOCs should be generated as below:
    1st IDOC as
    ABC,ON1 (Header Details)
    22,Item1,XX (Item1 Details)
    33,Item2,FF  (Item2 Details)
    2nd IDOC as
    ABC,ON2 (Header Details)
    44,Item1,MM  (Item1 Details)
    and 3rd IDOC as
    ABC,ON3 (Header Details)
    66,Item1,LL  (Item1 Details)
    Do following Data type for the above file structure is valid? or I can use one flat DT?
    Record
    Header(1..Unbounded)
    ---F1 (Field 1)
    ---ON (Key Field Order Number)
    Item Details(1..Unbounded)
    ---F1 (Field1)
    ---F2
    ---F3
    If the above DT is correct then how would be the FCC parameters?
    Thanks
    Rajeev

  • Load / Update Table from a .csv file

    Hi All,
    I thought I would just throw this out there..be kind.
    I have a requirement to build a page that allows the user to upload a excel (well I'll have them save it as a .csv) and upate an existing table in their schema.
    I have successfully created a similar page for inserting into an existing table however my update is not working. Then I realized what the Oracle Application Express Tool does that for me on, LOAD DATA page. The feature I like best is that after browsing for the file and clicking next it shows the column header and the row data underneath. I would really like to duplicate the functionality of this page.
    I looked into the flows schema found related procedures , for example wwv_flow_load_excel_data,but I'm lost on how to use them.
    Is there a way to duplicate the LOAD DATA Page and fit it to meet the users requirement?
    Also I have included my coding attempt :
    CREATE OR REPLACE PROCEDURE exceltotable2
    AS
    NAME: exceltotable
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 11/17/2008 1. Created this procedure.
    NOTES:
    Automatically available Auto Replace Keywords:
    Object Name: exceltotable
    Sysdate: 11/17/2008
    Date and Time: 11/17/2008, 2:02:03 PM, and 11/17/2008 2:02:03 PM
    Username: (set in TOAD Options, Procedure Editor)
    Table Name: (set in the "New PL/SQL Object" dialog)
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW (10000);
    v_char CHAR (1);
    c_chunk_len NUMBER := 1;
    v_line VARCHAR2 (32767) := NULL;
    v_data_array APEX_APPLICATION_GLOBAL.VC_ARR2;
    v_rows NUMBER;
    v_asset_id NUMBER;
    v_new_location GINOS_LOCATION.ID_LOCATION%TYPE ;
    sql_stmt VARCHAR2 (2000);
    --delete from data_upld;
    BEGIN
    -- Read data from wwv_flow_files</span>
    SELECT blob_content
    INTO v_blob_data
    FROM wwv_flow_file_objects$
         WHERE NAME = 'F32700/scannedforrdc.csv';
         --(used this for testing)
    -- WHERE last_updated = (select max(last_updated) from WWV_FLOW_FILE_OBJECTS$ where UPDATED_BY
    -- = 'ADMIN')
    --and id = (select max(id) from WWV_FLOW_FILE_OBJECTS$ where UPDATED_BY = 'ADMIN');
    v_blob_len := DBMS_LOB.getlength (v_blob_data);
    v_position := 1;
    -- Read and convert binary to char</span>
    WHILE (v_position <= v_blob_len)
    LOOP
    v_raw_chunk := DBMS_LOB.SUBSTR (v_blob_data, c_chunk_len, v_position);
    v_char := CHR (hex_to_decimal(RAWTOHEX(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved </span>
    IF v_char = CHR (10)
    THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := APEX_UTIL.string_to_table (v_line);
    -- Update assets with RDC location
    -- First get the current location id of the RDC
    -- Next take each serial number from the spreadsheet and update the location and rack details </span>
    Select id_location into v_new_location from ginos_location gl, ginos_site gs, ginos_agency ga
    where nm_office = 'OCFS Resource Distribution Center' and gl.id_site = gs.id_site
    And gl.id_agency = ga.id_agency And ga.nm_agency ='Office of Children and Family Services';
    -- test with only the serial number/location
    UPDATE GINOS_ASSET SET ID_LOCATION = v_new_location WHERE NM_SERIAL = v_data_array(1);
    -- Clear out
    v_line := NULL;
    v_rows := v_rows + 1;
    END IF;
    END LOOP;
    END;
    Any advice/assistance is always appreciated
    Thanks
    Moe

    Dan
    Thank You for your reply, I actually bookmark your site yesterday when googling this problem.
    I am going to give it a try. I have ran through steps 1 through 4. Step 4 , I modified to my page.
    Just a little more help..
    do I put my update table code in the procedure (step 4) - how do I view and extract the information from the collection?
    DECLARE
    l_blob BLOB;
    PROCEDURE cleanup
    IS
    BEGIN
    DELETE FROM WWV_FLOW_FILES
    WHERE name = :P103_UPLOAD;
    END cleanup;
    BEGIN
    SELECT blob_content
    INTO l_blob
    FROM WWV_FLOW_FILES
    WHERE name = :P103_UPLOAD;
    csv.create_collection_from_blob(l_blob, 'CSV_UPLOAD', 'Y');
    -- I looked in the ginodba schema (the ref schema for the app) for this collection but it's not there
    cleanup;
    EXCEPTION
    WHEN OTHERS
    THEN
    cleanup;
    RAISE;
    END;
    Thanks Again
    MOe

Maybe you are looking for

  • I use iCal, work wants me to sync with Outlook, how do I do this?

    Dear Community. I'm happily using iCloud to run my diary across all my Apple devices, how do I get my current setup to sync with Outlook so my office can see my diary? I don't want to change how I make appt's, I can make an appt on my phone, iPad or

  • Crash during spotlight indexing - Mountain Lion

    Macbook Pro Late 2011 Mountain Lion 500GB SSD (replaced original 750GB) 1TB (replaced faulty optical drive with OWC data doubler) 16GB ram (2x OWC 8GB) Over the last couple of months I've been plagued with crashes and kernal panics that, after time w

  • Error message when submitting PDF form

    I am very new at using Adobe Acrobat so I don't really know what I am doing. I created a PDF form for my site. I set it up to submit to an email. When I tested the form and hit the submit button I got this error "An error occurred while creating the

  • Making all Infotype 0033 fields available in an infoset

    Hi. I have an infoset using the logical database PNPCE and I just added infotype 0033 in the Further Infotypes option. The infotype is now displayed but not all the fields I need. I need fields AUS16, AUS17, AUS18, AUS19 and AUS20 to be both Selectio

  • Horizontally or Vertically Aligned Duplicating

    When i dulpicate an object across horizontally or vertically (holding down Option, Shift), the duplicated object usually doesn't stay aligned with it's original, see http://home.exetel.com.au/twistedpancreas/images/color_change.swf this has happened