Loading XML into a Table

Hi all
I want to create a procedure in which, I provided the name of the table and the location of the XML file, the procedure goes to this place and pick the file XML and load it into the table. Can it is possible?

Thank you

Best regards


Adil

Finally, I got your issue! It is the use of DBMS_LOB. LOADFROMFILE, I used DBMS_LOB. LOADCLOBFROMFILE instead. It was actually loading the binary content!. This is a fully functional code based on your table and XML file structure.
The XML file, I used:




28004125
251942
05-SEP-92
400
513
1
0


28004125
251943
04-OCT-92
400
513
1
0


True PL/SQL code:

SQL> /* Creating Your table */
SQL> CREATE TABLE IBSCOLYTD
  2  (
  3  ACTNOI VARCHAR2 (8),
  4  MEMONOI NUMBER (7,0),
  5  MEMODTEI DATE,
  6  AMOUNTI NUMBER (8,0),
  7  BRCDSI NUMBER (4,0),
  8  TYPEI NUMBER (4,0),
  9  TRANSMONI NUMBER (6,0)
 10  );

Table created.

SQL> CREATE OR REPLACE PROCEDURE insert_xml_emps(p_directory in varchar2,
  2                                              p_filename  in varchar2,
  3                                              vtableName  in varchar2) as
  4    v_filelocator    BFILE;
  5    v_cloblocator    CLOB;
  6    l_ctx            DBMS_XMLSTORE.CTXTYPE;
  7    l_rows           NUMBER;
  8    v_amount_to_load NUMBER;
  9    dest_offset      NUMBER := 1;
 10    src_offset       NUMBER := 1;
 11    lang_context     NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
 12    warning          NUMBER;
 13  BEGIN
 14    dbms_lob.createtemporary(v_cloblocator, true);
 15    v_filelocator := bfilename(p_directory, p_filename);
 16    dbms_lob.open(v_filelocator, dbms_lob.file_readonly);
 17    v_amount_to_load := DBMS_LOB.getlength(v_filelocator);
 18    ---  ***This line is changed*** ---
 19    DBMS_LOB.LOADCLOBFROMFILE(v_cloblocator,
 20                              v_filelocator,
 21                              v_amount_to_load,
 22                              dest_offset,
 23                              src_offset,
 24                              0,
 25                              lang_context,
 26                              warning);
 27
 28    l_ctx := DBMS_XMLSTORE.newContext(vTableName);
 29    DBMS_XMLSTORE.setRowTag(l_ctx, 'ROWSET');
 30    DBMS_XMLSTORE.setRowTag(l_ctx, 'IBSCOLYTD');
 31    -- clear the update settings
 32    DBMS_XMLStore.clearUpdateColumnList(l_ctx);
 33    -- set the columns to be updated as a list of values
 34    DBMS_XMLStore.setUpdateColumn(l_ctx, 'ACTNOI');
 35    DBMS_XMLStore.setUpdateColumn(l_ctx, 'MEMONOI');
 36    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'MEMODTEI');
 37    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'AMOUNTI');
 38    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'BRCDSI');
 39    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TYPEI');
 40    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TRANSMONI');
 41    -- Now insert the doc.
 42    l_rows := DBMS_XMLSTORE.insertxml(l_ctx, v_cloblocator);
 43    DBMS_XMLSTORE.closeContext(l_ctx);
 44    dbms_output.put_line(l_rows || ' rows inserted...');
 45    dbms_lob.close(v_filelocator);
 46    DBMS_LOB.FREETEMPORARY(v_cloblocator);
 47  END;
 48  /

Procedure created.

SQL> BEGIN
  2  insert_xml_emps('TEST_DIR','load.xml','IBSCOLYTD');
  3  END;
  4  /

PL/SQL procedure successfully completed.

SQL> SELECT * FROM ibscolytd;

ACTNOI      MEMONOI MEMODTEI     AMOUNTI     BRCDSI      TYPEI  TRANSMONI
-------- ---------- --------- ---------- ---------- ---------- ----------
28004125     251942 05-SEP-92        400        513          1          0
28004125     251943 04-OCT-92        400        513          1          0

SQL> 

Tags: Database

Similar Questions

  • Load data into a table

    Hi friends,

    I'm trying to load records into the rules of the product table of the table with the following...

    create table product)

    prod_id varchar2 (20).

    prod_grp varchar2 (20).

    from_amt number (10),

    to_amt number (10),

    share_amt number (10)

    );

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10037', "STK", 1, 18);

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10037', "NSTK", 1: 16.2);

    Insert into product (prod_id, prod_grp, from_amt, to_amt, share_amt) Values ('10038', "NSTK", 1, 5000, 12);

    Insert into product (prod_id, prod_grp, from_amt, to_amt, share_amt) Values ('10038', "STK", 5001, 10000, 16);

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10038', "STK", 10001, 20);

    Insert into product (prod_id, prod_grp, from_amt, to_amt, share_amt) Values ('10039', "NSTK", 1, 8000, 10);

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10039', "STK", 8001, 12);

    create table rules)

    rule_id varchar2 (30),

    rule_grp varchar2 (10),

    rate_1 number (10),

    point_1 number (10),

    rate_2 number (10),

    point_2 number (10),

    rate_3 number (10),

    point_3 number (10)

    );

    Criteria of loading in the rules of the table:

    rule_id - "RL" | Product.prod_id

    rule_grp - product.prod_grp

    rate_1 - product.share_amt where from_amt = 1

    point_1 - product.to_amt

    rate_2 - if product.to_amt in point_1 is not NULL, then find product.share_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt (current record -

    point_1) + 1

    point_2 - if product.to_amt in point_1 is not NULL, then find product.to_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt (current record - )

    point_1) + 1

    rate_3 - if product.to_amt in point_2 is not NULL, then find product.share_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt(current )

    Enregistrement-point_2) + 1

    point_3 - if product.to_amt in point_2 is not NULL, then find product.to_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt (current record - )

    point_2) + 1

    I tried to load the first columns (rule_id, rule_grp, rate_1, point_1, rate_2, point_2) via the sql loader.

    SQL > select * from product;

    PROD_ID PROD_GRP FROM_AMT TO_AMT SHARE_AMT

    -------------------- -------------------- ---------- ---------- ----------

    10037                STK                           1                    18

    10037                NSTK                          1                    16

    1 5000 12 NSTK 10038

    10038 5001-10000-16 STK.

    10038 10001 20 STK.

    10039 1 8000 10 NSTK

    10039                STK                        8001                    12

    produit.dat

    PROD_ID | PROD_GRP | FROM_AMT | TO_AMT | SHARE_AMT

    "10037' |'. STK' | 1. 18

    "10037' |'. NSTK' | 1. 16.2

    '10038' |' NSTK' | 1. 5000 | 12

    '10038' |' STK' | 5001 | 10000 | 16

    '10038' |' STK' | 10001 | 20

    "10039' |'. NSTK' | 1. 8000 | 10

    "10039' |'. STK' | 8001 | 12

    Product.CTL

    options (Skip = 1)

    load data

    in the table rules

    fields ended by ' |'

    surrounded of possibly ' '.

    trailing nullcols

    (rule_id POSITION (1) ""RL"|: rule_id")

    rule_grp

    from_amt BOUNDFILLER

    point_1

    share_amt BOUNDFILLER

    , rate_1 ' BOX WHEN: from_amt = 1 THEN: share_amt END.

    , rate_2 expression "(sélectionnez pr.share_amt de produit pr où: point_1 n'est pas null et pr.prod_id=:rule_id et: point_1 =: from_amt + 1)" "

    , expression point_2 "(sélectionnez pr.to_amt de produit pr où: point_1 n'est pas null et pr.prod_id=:rule_id et: point_1 =: from_amt + 1)" "

    )

    He has not any support only values in rate_2, point_2... no error either... Not sure if there is another method to do this...

    Please give your suggestions... Thank you very much for your time

    Hello

    Thanks for posting the CREATE TABLE and INSERT instructions for the sample data; It's very useful!

    Don't forget to post the exact results you want from this data in the sample, i.e. what you want the rule table to contain once the task is completed.

    As ground has said, there is no interest to use SQLLDR to copy data from one table to another in the same database.  Use INSERT, or perhaps MERGE.

    2817195 wrote:

    Thank you for your answers... I thought it would be easier to manipulate the data using sql loader... I tried to use insert but do not know how to insert values in point_2, rate_3, rate_2, point_3, columns... For example, when point_1 is not null, need to do a find for the next with the same rule_id record and if the inserted record = pr.from_amt + 1 point_1 then RATE_2 should be inserted with this pr.share_amt of this record...

    SQL > insert into the rules)

    2 rule_id,

    rule_grp 3,.

    rate_1 4,.

    point_1 5,.

    rate_2 6,.

    point_2 7,.

    rate_3 8,.

    9 point_3)

    10. Select

    11 'RL ' | PR.prod_id RULE_ID,

    12 pr.prod_grp RULE_GRP,

    13 CASES WHEN END of pr.from_amt = 1 THEN pr.share_amt RATE_1,

    14 pr.to_amt POINT_1,

    15 (select pr.share_amt from product pr where point_1 is not null and rules.rule_id = pr.prod_id and point_1 = pr.from_amt + 1) RATE_2,

    16 (select pr.to_amt from product pr where point_1 is not null and rules.rule_id = pr.prod_id and = pr.from_amt + 1 point_1) POINT_2,.

    17 (select pr.share_amt from product pr where point_2 is not null and rules.rule_id = pr.prod_id and = pr.from_amt + 1 point_2) RATE_3,.

    18 (select pr.to_amt from product pr where point_2 is not null and rules.rule_id = pr.prod_id and = pr.from_amt + 1 point_2) POINT_3

    19 product pr;

    (select pr.share_amt from product pr where point_1 is not null and point_1 = pr.from_amt + 1) RATE_2,

    *

    ERROR on line 15:

    ORA-00904: "POINT_1": invalid identifier

    Help, please... Thank you very much

    This is what causes the error:

    The subquery on line 15 references only 1 table in the FROM clause, and this table is produced.  There is no point_1 column in the product.

    A scalar subquery like this can be correlated to a table in the Super request, but the only table in the FROM (line 19) clause is also produced.  Since the only table that you read is produced, only columns that you can read are the columns of the product table.

    You use the same table alias (pr) to mean different things 5. It's very confusing.  Create aliases for single table in any SQL statement.  (What you trying to do, I bet you can do without all these subqueries, in any case.)

  • APEX 5: FILE item type to BROWSE not load file into the table apex_application_temp_files

    Hello

    I am trying to load the BLOB (CSV file) into apex_application_temp_files table using the file_browse item type. I have created an example page and the added element of type file_browse, added a dynamic action, which send item to browse.

    Also added a button load that submits the page. But when I check the apex_application_temp_files of APEX sql workhop table, nothing appears.

    I purge file to "end of Session. Enclosed screen shot as well.Capture.PNG

    Thank you

    Ankit

    Hi Pierre,.

    has added a dynamic action, submitting travel item.

    How can you submit just the element go? How your dynamic action look like?

    But when I check the apex_application_temp_files of APEX sql workhop table, nothing appears.

    It is by design, because the sight of apex_application_temp_files limited to your current session. In your case at the session of constructor and not your application.

    Add a process to the page that contains the item "Browse file" when you use

    select *
      from apex_application_temp_files
     where name = :page item name;
    

    to access your downloaded BLOB.

    Concerning

    Patrick

  • SQL Loader loading data into two Tables using a single CSV file

    Dear all,

    I have a requirement where in I need to load the data into 2 tables using a simple csv file.

    So I wrote the following control file. But it loads only the first table and also there nothing in the debug log file.

    Please suggest how to achieve this.

    Examples of data

    Source_system_code,Record_type,Source_System_Vendor_number,$vendor_name,Vendor_site_code,Address_line1,Address_line2,Address_line3

    Victor, New, Ven001, Vinay, Vin001, abc, def, xyz

    Control file script

    ================

    OPTIONS (errors = 0, skip = 1)
    load data
    replace
    in the table1 table:
    fields ended by ',' optionally surrounded "" "
    (
    Char Source_system_code (1) POSITION "ltrim (rtrim (:Source_system_code)),"
    Record_type tank "ltrim (rtrim (:Record_type)),"
    Source_System_Vendor_number tank "ltrim (rtrim (:Source_System_Vendor_number)),"
    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"
    )
    in the Table2 table
    1 = 1
    fields ended by ',' optionally surrounded "" "
    (
    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"
    Vendor_site_code tank "ltrim (rtrim (:Vendor_site_code)),"
    Address_line1 tank "ltrim (rtrim (:Address_line1)),"
    Address_line2 tank "ltrim (rtrim (:Address_line2)),"
    Address_line3 tank "ltrim (rtrim (:Address_line3)).
    )

    the problem here is loading into a table, only the first. (Table 1)

    Please guide me.

    Thank you

    Kumar

    When you do not provide a starting position for the first field in table2, it starts with the following after a last referenced in table1 field, then it starts with vendor_site_code, instead of $vendor_name.  So what you need to do instead, is specify position (1) to the first field in table2 and use the fields to fill.  In addition, he dislikes when 1 = 1, and he didn't need anyway.  See the example including the corrected below control file.

    Scott@orcl12c > test.dat TYPE of HOST

    Source_system_code, Record_type, Source_System_Vendor_number, $vendor_name, Vendor_site_code, Address_line1, Address_line2, Address_line3

    Victor, New, Ven001, Vinay, Vin001, abc, def, xyz

    Scott@orcl12c > test.ctl TYPE of HOST

    OPTIONS (errors = 0, skip = 1)

    load data

    replace

    in the table1 table:

    fields ended by ',' optionally surrounded "" "

    (

    Char Source_system_code (1) POSITION "ltrim (rtrim (:Source_system_code)),"

    Record_type tank "ltrim (rtrim (:Record_type)),"

    Source_System_Vendor_number tank "ltrim (rtrim (:Source_System_Vendor_number)),"

    $vendor_name tank "ltrim (rtrim (:Vendor_name)).

    )

    in the Table2 table

    fields ended by ',' optionally surrounded "" "

    (

    source_system_code FILL (1) POSITION.

    record_type FILLING,

    source_system_vendor_number FILLING,

    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"

    Vendor_site_code tank "ltrim (rtrim (:Vendor_site_code)),"

    Address_line1 tank "ltrim (rtrim (:Address_line1)),"

    Address_line2 tank "ltrim (rtrim (:Address_line2)),"

    Address_line3 tank "ltrim (rtrim (:Address_line3)).

    )

    Scott@orcl12c > CREATE TABLE table1:

    2 (Source_system_code VARCHAR2 (13),)

    3 Record_type VARCHAR2 (11),

    4 Source_System_Vendor_number VARCHAR2 (27),

    5 $vendor_name VARCHAR2 (11))

    6.

    Table created.

    Scott@orcl12c > CREATE TABLE table2

    2 ($vendor_name VARCHAR2 (11),)

    3 Vendor_site_code VARCHAR2 (16).

    4 Address_line1 VARCHAR2 (13),

    5 Address_line2 VARCHAR2 (13),

    Address_line3 6 VARCHAR2 (13))

    7.

    Table created.

    Scott@orcl12c > HOST SQLLDR scott/tiger CONTROL = test.ctl DATA = test.dat LOG = test.log

    SQL * Loader: release 12.1.0.1.0 - Production on Thu Mar 26 01:43:30 2015

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 1

    TABLE1 table:

    1 row loaded successfully.

    Table TABLE2:

    1 row loaded successfully.

    Check the log file:

    test.log

    For more information on the charge.

    Scott@orcl12c > SELECT * FROM table1

    2.

    RECORD_TYPE SOURCE_SYSTEM_VENDOR_NUMBER $VENDOR_NAME SOURCE_SYSTEM

    ------------- ----------- --------------------------- -----------

    Victor Ven001 new Vinay

    1 selected line.

    Scott@orcl12c > SELECT * FROM table2

    2.

    $VENDOR_NAME VENDOR_SITE_CODE ADDRESS_LINE1 ADDRESS_LINE2 ADDRESS_LINE3

    ----------- ---------------- ------------- ------------- -------------

    Vinay Vin001 abc def xyz

    1 selected line.

    Scott@orcl12c >

  • How to load data into the table of correspondence in OIM 11 g

    Hello
    I have a lot of data that must be loaded into the table of choice as Codekey and decode. How can I load the data in bulk instead of manually via console Design?

    Is it possible to do? No API IOM or any what SQL query

    Kind regards
    JS

    Here's what you need to get.

    psLookupCode - search name,
    psValue - Code key
    psDescriptivevalue - DecodeKey

    The rest can be empty.

    addLookupValue

    void addLookupValue (java.lang.String psLookupCode,
    java.lang.String psValue,
    java.lang.String psDescriptiveValue,
    java.lang.String psLanguage,
    java.lang.String psCountry)
    throws Thor.API.Exceptions.tcAPIException,
    Thor.API.Exceptions.tcInvalidLookupException,
    Thor.API.Exceptions.tcInvalidValueException,
    tcAPIException adds a new entry for the specified search

    Parameters:
    psLookupCode - the Code for the definition of research
    psValue - the value that will be stored in the database
    psDescriptiveValue - a descriptive version of the value to be added
    psLanguage - the language for the added entry. Leave blank to accept the default value (en)
    psCountry - country for the specified entry. Leave blank to accept the default (US)

    Throws: tcAPIException tcInvalidLookupException - thrown if the search Code is no tcInvalidValueException - thrown if the value cannot be added to the list of choices (because it's a double, etc.)

    M

  • Loading XML into the relational Table data

    Hello

    I get a generated XML file to other tools (Windows), I am trying to create a Linux shell script that will gather the necessary XML file to my Linux server, then ask Oracle to use this file to load the XML data into a relational table. This activity and the data will be needed on an ongoing basis.

    I tried two ways. First, I loaded the XML document into the database and tried to extract the data directly from the document, but it does not work. Now I want to try to read the data directly from the file on the server through select, however I don't get all the returned data. In the Select statement below, I am trying to query the data to see what is returned for my tests.

    Create Table ci_results_table (transactionID Varchar2 (100), //transactionID should be PrimaryKey but became errors in test of insert, PK so deleted NULL value)

    message Varchar2 (200),

    This Varchar2 (50).

    XMLType of the ProcessedDate,

    status Varchar2 (50).

    sourceFile VarChar2 (100));

    Select x.*

    from XMLTable)

    ' TSPLoadResults/results '.

    PASSAGE xmltype (bfilename('CMDB_DEVADHOCRESULTS_DIR','LoadResults-HP_146.results.xml'), nls_charset_id ('AL32UTF8'))

    COLUMNS

    transactionID PATH Varchar2 (100) 'TransactionID '.

    Result XMLType PATH 'result ',.

    Message Varchar2 (200) PATH "Message."

    PrimaryKey Varchar2 (50) PATH "PrimaryKey"

    Date of ProcessedDate path "ProcessedDate."

    Status Varchar2 (50) PATH "Status."

    SourceFile VarChar2 (100) PATH "SourceFileName.

    ) x

    ;

    Eventually, I'll have to build on that to limit the returned data to records where SourceFileName is like '% PA' and insert what is returned in to the ci_results_table. Attached is an example of the XML results file I am trying to load, it is named "ResultsTransformedtoUnix" because I used dos2Unix to convert Unix which can be good or bad. (I send the output file must be converted to the format BACK until the other application can read). Original (before converting Unix) file named in the script is also attached.

    Help, please. Thank you!

    Hello

    I see some bad things in your query.

    (1) obvious one, explaining why you get all the data: there is a typing error in the XQuery expression, there 'result' not'slead.

    (2) ProcessedDate can be extracted as a date (at least not directly) because it actually represents a timestamp, use the TIMESTAMP WITH time ZONE HOURS and cast back to DATE data type in the SELECT clause

    (3) transactionID is an attribute, it must be accessible with ' @' (or ' attribute:' axis)

    (4) if the encoding of file really is ISO-8859-1 as suggested in the prologue, then do not use AL32UTF8 but the name of the corresponding character set: WE8ISO8859P1

    Here is the query to work:

    select x.transactionID
         , x.Message
         , x.Primarykey
         , cast(x.ProcessedDate as date) ProcessDate
         , x.Status
         , x.SourceFile
    from XMLTable(
           '/TSPLoadResults/Result'
           PASSING xmltype(bfilename('XML_DIR','LoadResults-HP_146.results.xml'), nls_charset_id('WE8ISO8859P1'))
           COLUMNS
             transactionID Varchar2(100)            PATH '@transactionID',
             Message       Varchar2(200)            PATH 'Message',
             PrimaryKey    Varchar2(50)             PATH 'PrimaryKey',
             ProcessedDate timestamp with time zone PATH 'ProcessedDate',
             Status        Varchar2(50)             PATH 'Status',
             SourceFile    VarChar2(100)            PATH 'SourceFileName'
         ) x
    ;
    

    Directly on the file using this query will only be decently (for large files) on 11.2.0.4 and beyond.

    On older versions, first load the file into a (temporary) XMLType column with binary XML storage and CHOOSE from there.

    because I used dos2Unix to convert Unix which can be good or bad.

    This conversion should not be necessary.

  • Need a sql script loader to load data into a table

    Hello

    IM new to Oracle... Learn some basic things... and now I want the steps to do to load the data from a table dump file...

    and the script for sql loader

    Thanks in advance

    Hello

    You can do all these steps for loading data...

    Step 1:

    Create a table in Toad to load your data...

    Step 2:

    Creating a data file... Create your data file with column headers...

    Step 3:

    Creating a control file... Create your control file to load the data from the table data file (there is a structure of control file, you can search through the net)

    Step 4:

    Move the data file and the control file in the path of the server...

    Step 5:

    Load the data into the staging table using sql loader.

    sqlldr control = data =

    connect as: username/password@instance.

  • How to insert xml into a table in different format

    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>
        <a>CNET</a>
        <b>21416911</b>
        <c>12345678</c>
        <d>878787</d>
        </ROW>
    </ROWSET>
    
    creating a test table:
    CREATE TABLE test (
        friendlyname VARCHAR2(150),
        value varchar2(200));
    I want to insert the XML in the test of the table as below
    SELECT * FROM test;
    friendlyname value
    a   CNET
    b   21416911
    c   12345678
    d   878787
    Please advice.

    Here's the idea:

    SQL> DECLARE
      2
      3    xmldoc xmltype := xmltype(
      4  '
      5      
      6      
      7      CNET
      8      21416911
      9      12345678
     10      878787
     11      
     12  ') ;
     13
     14  BEGIN
     15
     16    INSERT INTO test (friendlyname, value)
     17    SELECT x.fname, x.value
     18    FROM XMLTable(
     19           '/ROWSET/ROW/*'
     20           passing xmldoc
     21           columns fname varchar2(150) path 'local-name(.)'
     22                 , value varchar2(200) path 'text()'
     23         ) x ;
     24
     25  END;
     26  /
    
    PL/SQL procedure successfully completed
    
    SQL> select * from test;
    
    FRIENDLYNAME     VALUE
    ---------------- ------------
    a                CNET
    b                21416911
    c                12345678
    d                878787
     
    

    Can be optimized according to the size of input XML code and its location.

  • Loading XML into the text boxes

    I was looking at the code for hours... I have an xml doc that contains scores of football that will load into my flash dashboard. The game was postponed, there is a node called status which is filled with the info if this node is empty. My function sets the visibility property of the false status1_txt if there is nothing in that (undefined) node, otherwise it will display data that is there. If the first node is not set, it will start testing to white, the way it is supposed to. But the minute he shoots data in this text box, it doesn't go away until there is more data to replace. Looks like it is without taking into account the first part of my if statement. Any help would be greatly appreciated. I'm sure it's something simple but I just can not understand!

    I ended up using this to solve the problem. Thank you very much!

    If (status1 [p] == undefined) {}
    status1_txt. Text = "";
    } else {}
    status1_txt. Text = status1 [p];
    }

  • Load data into a table from two sources

    I developed an interface that has tables of the source of a source database that contains data of 4 companies. (we have multiple servers for different companies). Now, there is a requirement to load the data to another company in the same data warehouse. The problem is that the source is on another server. The database structure is the same. The names of tables, constraints are the same.

    I can't just duplicate my previous interface and change the data source to this interface. -Does anyone know how to do this. I have about 50 + such interface of re - developing another interface is quite a tedious task.

    Hello

    Here are links to examples of the context, in the examples they use development and Production environments in order to demonstrate the different environments.  In your project, it will be the different companies.  Create a context for each company, provided that the scheme remains the same across companies.

    https://blogs.Oracle.com/dataintegration/entry/executing_the_same_code_in_all

    Context, physical and logical schema - how does it work? -ODIExperts.com

    http://www.odigurus.com/2011/10/ODI-contexts.html

    Thank you

    ARV

  • Loading XML into the intranet? urgent help please...

    Dear friends, I need urgent help: I have a screen CAYIN (which allows me to display the evetns, etc.) and gives me the possibility of loading / displaying a FLASH (SWF) file, well, I need this SWF to load data XML ("texto.xml") but seems when the CAYIN programme that is running flash, does not the SWF find the XML code in the same folder...

    Then I tried many ways to load the XML file without success up to now. Some tests are:

    obj_xml. Load("\\192.168.0.100\media\texto.xml")

    obj_xml. Load("\media\texto.xml")

    obj_xml. Load ("texto.xml")

    obj_xml. Load("..) ("/ media/texto.xml")

    obj_xml. Load("\\media\texto.xml")

    obj_xml. Load("file:\\192.168.0.100\media\texto.xml")

    obj_xml. Load("..) \\192.168.0.100\media\texto. XML")

    I guess I write something wrong or forget something. Could someone help me please? because these files are in a '192.168.0.100' internal server (intranet).

    Emergency help please, thanks in advance,

    If the swf file is in a directory with subdirectory media that contains texto.xml, use:

    obj_xml. Load("Media/texto.xml")

  • Loading data into the table by file name

    Hi all

    I am new to ODI. I have a requirement of loading a flat file in oracle, as well as the name of the file in a single column of the table. This means that, if there are 10 rows of data from this file, then the extra column "FileName" to the table will be the name of the active file written 10 times. Please suggest how this can be achieved. I am able to do half of it but the file name is not filled.

    Thank you.

    Hello

    See the link below for dynamic fair value can be useful for you

    http://blogs.Oracle.com/dataintegration/2009/04/using_parameters_in_odi_the_dy_1.html

    Thank you
    Merlina.

  • ComboBox in load XML into a new file

    I have an XML file that contains a node with a reference to another XML file. I am trying to load the first XML file in a ComboBox control. When the user makes a selection, the new XML file will load in a TileList/VBox. I can't understand how to move the XML file referenced from the user selection and display the results of this new XML file.

    So, this is the flow:

    1. the user chooses the catalog they would like to see go a CombBox (which is filled by a XML file)
    2 the categories referenced in #1 also point to another .xml file
    3. the user selects in the drop-down list
    4. the appropriate XML file is passed and displayed in a TileList/VBox

    I hope I'm making sense...

    Do you mean something like this:

    -Main file: -.


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete =" loadNewCategory (category.selectedItem) ">"




    [Bindable]
    public var productData:XML;

    private void loadNewCategory(category:Object):void
    {
    var loader: URLLoader = new URLLoader (new URLRequest (category.@file));
    loader.addEventListener (Event.COMPLETE, function(e:Event):void
    {
    productData = XML (loader.data);
    });
    }
    ]]>

    -the categories.xml file: -.






    -cheap.xml: -.







    -cool.xml: -.





    -fast.xml: -.






  • Load a CSV file into a table like in dataworkshop

    Workshop of data has a function to load a CSV file and create a table based on it, the same, I want to create in my application.



    I went through the forum http://forums.oracle.com/forums/thread.jspa?threadID=334988 & start = 60 & tstart = 0

    but not able to download all the files (application, package HTMLDB_TOOLS and PAGE_SENTRY function) could not find the PAGE_SENTRY function.

    AND when I open this link http://apex.oracle.com/pls/apex/f?p=27746

    I could not run the application. I've provided a CSV file and when I click on SEND, I get the error:

    ORA-06550: line 1, column 7: PLS-00201: identifier ' HTMLDB_TOOLS. PARSE_FILE' must be declared

    tried in apex.oracle.com host as shown in the previous post.

    any help pls..,.

    Another method to load data into the tables..., (as dataworkshop)

    Hello

    I have check app works very well.

    Have you read instructions?
    Load a CSV file in a table
    >
    Create a small csv file as

    col1, col2, col3
    VARCHAR2 (10), Number, "Number (10.2)" "
    Cat, 2, 3.2
    dog, 99, 10.4
    >
    First row must have valid column names. To verify that your first line of titles have no spaces or those who are not words reserved.
    Second line of the CSV file must have column of table data types.

    When you meet these requirements app works perfectly

    Kind regards
    Jari

  • Problem loading xml using sql loader file

    I am trying to load data into the table test_xml (xmldata XMLType)

    I have an xml file and I want any file to load in a single column

    When I use the following control file and run from the command-line as follows
    sqlldr $1@$TWO_TASK direct control=$XXTOP/bin/LOAD_XML.ctl = true; :

    DOWNLOAD THE DATA
    INFILE *.
    TRUNCATE INTO TABLE test_xml
    XmlType (XMLDATA)
    FIELDS
    (
    tank fill ext_fname (100),
    XMLDATA LOBFILE (ext_fname) COMPLETED BY expressions of folklore
    )
    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    the file is loaded in the table perfectly.

    Unfortunately I can't hard-code the name of file as file name will be changed dynamically.

    so I removed the block

    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    control file and tried to run by giving the following command line path

    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl direct data=/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml = true;

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Please find the log of the program with the error

    ------------------------------------------------------------------
    Loading XML through SQL * Loader begins
    ------------------------------------------------------------------
    SQL * Loader-502: cannot open the data file ' <? XML version = "1.0"? > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< root >' XMLDATA field table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > forms < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > PLL < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML

    Please help me how can I load full xml in a single column using command line without Hardcoding in the control file

    Published by: 907010 on January 10, 2012 02:24

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Nothing strange, that the data parameter specifies the file containing the data to load.
    If you use the name of the XML here, the control file will try to interpret each line of XML as being separate ways.

    The traditional approach this is to have the name of the file stored in another file, say filelist.txt and use, for example:

    echo "/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml" > filelist.txt
    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl data=filelist.txt direct=true;
    

Maybe you are looking for