Error when inserting rows into a table

Hello

We have recently migrated to 9i and 10g. We have a scheduled task on our database who first removes all rows from a table and then inserts them back by selecting the lines of 5 tables. This table has a composite primary key based on 6 columns in it. In 9i, when I try to insert rows in the table after you remove all of the lines, I am able to insert the data successfully. However, in 10g, when I try to do the same operation, it fails with error ORA:

ORA-00001: unique constraint violated

The same query that works perfectly in 9i fails in 10g

If anyone has some ideas on how to solve the same, kindly let me know.

Thanks in advance.

CrazyAnie wrote:
Okay, so now the only option that remains is that I have load the data into a local table and then perform the loading.

May not be the only option, but the safest and cleanest I would say.

CrazyAnie wrote:
Also, it would be very kind of you that you might suggest all other possible risk areas where this CHARSET conversion could be a concern.

I imagine that the main areas of concern will be you are interfacing directly with other databases through database links and using string functions. Otherwise, as long as the manipulation of data is in the same database 10g should not be a problem.

CrazyAnie wrote:
I made the migration of my source 9i DB, which is on Solaris to my 10g database which is on Linux and a separate server (which resides in a completely different location) uses exp and IMP. So if I try to export my schema after you change the CHARACTER set and then import it into the target DB, should that help me to get rid of this error? What is an option that can be done?

I don't think it would be that simple change your database character set, check out this link for discussions about the same:

[http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:5783936214008]

Tags: Database

Similar Questions

  • table name not valid error when inserting values into a table

    I use the following statement to insert values into a table:

    curs. Execute ("INSERT INTO _ * '%s' * _ VALUES ((SELECT MAX (REC_ID) + 1 OF GSAP_MSG_IN), (SELECT MAX (gsap_msg_id) + 1 OF GSAP_MSG_IN), 'SHELLSAP', sysdate, '%s', EMPTY_BLOB(), 1, SYSDATE, EMPTY_BLOB (), SYSDATE)" %(*table_name*,file_extension)) ")

    whence table_name the following statement

    table_name = ' config.staging_db_tablesNames ['in_msgs]

    as I created a configuration file for all parameters that can change. The value of the table in the audit using a print command is correctly, but when put in the query above to run the insert statement gives an error. The following is the summary of comprehensive performance where you can see the table name as

    $ python gsapscnr.py
    Vote for the data files in/home/mh/inbox /...

    GSAP_MSG_IN
    Traceback (most recent call changed):
    File "gsapscnr.py", line 147, in it?
    poll_for_data()
    File "gsapscnr.py", line 86, in poll_for_data
    Sorter = load_details_first)
    File "gsapscnr.py", line 42, survey
    curs. Execute ("INSERT INTO '%s' VALUES ((SELECT MAX (REC_ID) + 1 OF GSAP_MSG_IN), (SELECT MAX (gsap_msg_id) + 1 OF GSAP_MSG_IN), 'SHELLSAP', sysdate, '%s', EMPTY_BLOB(), 1, SYSDATE, EMPTY_BLOB (), SYSDATE)" %(table_name,file_extension)) ")
    cx_Oracle.DatabaseError: ORA-00903: invalid table name

    Can anyone help with this problem please. I'm passing the value of the table in a bad way. Also if anyone can suggest a good tutorial for paythong programming using cx_Oracle.

    Concerning

    Print the SQL string that you establish, cut and paste it this output in SQL * more and see if it runs. This may show you that you should remove the single quotes around the name of the table %s in the Python file.

  • error when inserting the values too much or miss comma

    Hai All

    during the insertion, I got an error when inserting

    I have a table called T1 and declared as date I need to insert the current date and time in this column


    So I converted a varchar column and concat with time and iam trying to insert when inserting I got error


    insert into dail_att (respondent) values (to_date (to_char (attend_date, 'ddmmyyyy') |)) ("0815',"ddmmyyyy hh24");


    Concerning

    Srikkanth.M

    Hello
    Please let us know

    Desc dail_att;
    

    and the sample values in

    attend_date
    

    (There is also a ')' missing in your SQL, correct SQL would be

    INSERT INTO DAIL_ATT
                (INTIME
                )
         VALUES (TO_DATE (TO_CHAR (ATTEND_DATE, 'ddmmyyyy') || '0815',
                          'ddmmyyyy hh24'
                         )
                );
    

    * 009 *.

    Published by: 009 on March 18, 2010 21:23

  • Gears - error when you try to insert values into a table with multiple columns

    Hello

    I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.

    I have:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?, ?)', [devName, devAge]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I get the error:

    net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.

    I use this reference: http://code.google.com/apis/gears/api_database.html

    Everything works if I have only one field as:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?)', [devName]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56

    Thank you

    Davy

    Yes, a SQLite database will persist between battery pulls.  The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.

    In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data.  This adds extra overhead fresh for the final, delete and insert first for a given table.  Instead, define and finalize your drawing before you create your table.  Once created, review the static schema.

    That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.

    See you soon,.

    Adam

  • Error when inserting XML Date in the Table

    Hi all

    I am working on Oracle 11 g and trying to insert a date XML in the table but get error - below

    Query - insert into TableName (ID, CREATION, CREATEDBY) VALUES (50, *'2010 - 12-15 T 12: 57:19'*, 'Name')

    Error - java.sql.SQLDataException: ORA-01861: literal does not match the format string

    CREATED column datatype is Date

    When I try to use sysdate instead of hard-coding XML date of obtaining inserted successfully into the table. Please let me know how to pass this XML format date.

    Thanks in advance.

    Concerning
    Nikhil

    I don't see any XML in what you posted. In any case:

    "2010 12-15 T 12: 57:19'.

    is a string, not a date. Use:

    to_date('2010-12-15T12:57:19','YYYY-mm-dd"T"HH24:mi:SS')

    For example:

    SQL> create table tbl(created date);
    
    Table created.
    
    SQL> insert into tbl values('2010-12-15T12:57:19');
    insert into tbl values('2010-12-15T12:57:19')
                           *
    ERROR at line 1:
    ORA-01861: literal does not match format string
    
    SQL> insert into tbl values(to_date('2010-12-15T12:57:19','YYYY-MM-DD"T"HH24:MI:SS'))
      2  /
    
    1 row created.
    
    SQL> 
    

    SY.

  • Insert a row into the table on a button click

    Hi all

    I have a table called 'temp' with 4 columns such as seq, name, event, id and I have a GP with 3 text such as name, event id fields

    now my question is

    If I enter values in the 3 text fields on this page and a button, click on (for example create), I wanted the values of dose to get inserted into the table 'temp' and

    regarding, "seq" column I HAV created a sequence for it.

    so 1. How to insert values into the table by entering the values in the page

    2 wat shd b made to column seq... (shd b anyth made apex pages or wil automatically get values for each input line)

    pls help me...

    Thanks in advance

    1, it is up to you change your account to something more user-friendly than '8f4692cc-040e-48ee-b102-590cdd4303fc'.

    Then, it would also be a good idea to use proper English when you ask a question here...  Not broken English as "now comes to my" and "wat shd b"... More people will be willing to help you if you at least put forward in order to ask a good question...

    Which version of the database are you using? APEX version?

    Change the code above to this process:

    DECLARE

    v_seq NUMBER;

    BEGIN


    Select SEQUENCE_NAME. NEXTVAL INTO v_seq

    Double;


    INSERT INTO temp (seq, name, event, id)

    VALUES (v_seq,: P1_name,: P1_event,: P1_id);

    END;


    This allows it to be used in older versions of Oracle that do not allow direct access to the sequence.nextval in an assignment statement.


    Thank you


    Tony Miller

    Software LuvMuffin

  • Could not use DB function call to insert a row into a table OBIEE

    Hello

    At the prompt of the OBIEE report, I create a DB function in a variable column of the guest, so whenever I'm in the dropdown variable ob column call the function DB call.

    The function call is insert a row into a table in the database. However, it seems impossible to insert the row into the table.

    I have test the function in the sqlplus and it works, if the function has no problem. The problem is OBIEE failed to insert something in the datebase, it can only read from it.

    Any ideas on how I could fix it?

    Thank you!

    Hello
    Use your Evaluate function and the variable correctly. In the case where u called this function evaluate in the report in a column, and he has 100 files it contains, it will call db 100 times.

    Kind regards
    Anitha.B

  • How to insert records into a table from a button?

    Hey,.

    I use Oracle form and I have a trigger button when button pressed.

    I have a project being given for one of my classes. Basically, I have a Customers table and they hit the news. When they press submit, it must insert it into the table.

    And here is the code I wrote to be inserted inside the button

    declare


    v_cust_id customer_detail.customer_id%type;

    v_f_name customer_detail.fname%type;

    v_l_name customer_detail.lname%type;

    v_destination customer_detail.destination%type;

    v_travel_date customer_detail.travel_date%type;

    v_address customer_detail.address%type;

    v_telephone customer_detail.telephone%type;


    Start

    insert into customer_detail

    values (v_customer_id, v_fname, v_l_name, v_destination, v_travel_date, v_address, v_telephone);

    end;

    /


    But its gives me an error. Is a PLsql Oracle form different syntax?

    Why do you need to insert in the command, when applications oracle has this native features?

    Make a form based on the table and just use

    COMMIT_FORM; on your BUTTON.

    Hope this helps

    Hamid

  • Doubt about inserting data into a table

    Hi all, when I try to insert data into a table through an anonymous block, the pl/sql block runs successfully, but the data are not get inserted. Can someone please tell me where I am doing wrong?
    SQL> DECLARE
      2
      3  V_A NUMBER;
      4
      5  V_B NUMBER;
      6
      7  v_message varchar2(25);
      8
      9
     10  BEGIN
     11
     12
     13  select regal.regal_inv_landed_cost_seq.NEXTVAL into V_A from dual ;
     14
     15  select regal.regal_inv_landed_cost_seq.currval into V_B from dual ;
     16
     17  INSERT INTO rcv_transactions_interface
     18  (
     19               INTERFACE_TRANSACTION_ID,
     20               HEADER_INTERFACE_ID,
     21               GROUP_ID,
     22               TRANSACTION_TYPE,
     23               TRANSACTION_DATE,
     24               PROCESSING_STATUS_CODE,
     25               PROCESSING_MODE_CODE,
     26               TRANSACTION_STATUS_CODE,
     27               QUANTITY,
     28               LAST_UPDATE_DATE,
     29               LAST_UPDATED_BY,
     30               CREATION_DATE,
     31               CREATED_BY,
     32               RECEIPT_SOURCE_CODE,
     33               DESTINATION_TYPE_CODE,
     34               AUTO_TRANSACT_CODE,
     35               SOURCE_DOCUMENT_CODE,
     36               UNIT_OF_MEASURE,
     37               ITEM_ID,
     38               UOM_CODE,
     39               EMPLOYEE_ID,
     40               SHIPMENT_HEADER_ID,
     41               SHIPMENT_LINE_ID,
     42               TO_ORGANIZATION_ID,
     43               SUBINVENTORY,
     44               FROM_ORGANIZATION_ID,
     45               FROM_SUBINVENTORY
     46  )
     47
     48  SELECT
     49       regal.regal_inv_landed_cost_seq.nextval,      --Interface_transaction_
    id
     50       V_A,                                          --Header Interface ID
     51       V_B,                                          --Group ID
     52       'Ship',                                       --Transaction Type
     53       sysdate,                                      --Transaction Date
     54       'PENDING',                                    --Processing Status Code
    
     55       'BATCH',                                      --Processing Mode Code
     56       'PENDING',                                    --Transaction Status Cod
    e
     57       lc.quantity_received,                          --Quantity
     58       lc.last_update_date,                          --last update date
     59       lc.last_updated_by,                           --last updated by
     60       sysdate,                                      --creation date
     61       lc.created_by,                                --created by
     62       'INVENTORY',                                  --Receipt source Code
     63       'INVENTORY',                                  --Destination Type Code
     64       'DELIVER' ,                                    --AUT Transact Code
     65       'INVENTORY',                                  --Source Document Code
     66        msi.primary_uom_code ,                       --Unit Of Measure
     67        msi.inventory_item_id,                        --Item ID
     68        msi.primary_unit_of_measure,                  --UOM COde
     69        fnd.user_id,
     70        V_A,                                         --Shipment Header ID
     71        V_B,                                         --SHipment Line ID
     72        82,                                           --To Organization ID
     73        'Brooklyn',                                     --Sub Inventory ID
     74        81,                                            --From Organization
     75        'Vessel'                                       --From Subinventory
     76
     77    FROM
     78       regal.regal_inv_landed_cost_tab lc,
     79       fnd_user fnd,
     80       mtl_system_items msi
     81
     82    WHERE
     83       lc.organization_id = msi.organization_id
     84       AND  lc.inventory_item_id = msi.inventory_item_id
     85       AND  lc.created_by = fnd.created_by;
     86
     87  commit;
     88  v_message := SQL%ROWCOUNT;
     89  dbms_output.put_line('v_message');
     90  END;
     91  /
    v_message
    
    PL/SQL procedure successfully completed.
    SQL> select * from rcv_transactions_interface;
    
    no rows selected
    Thanks in advance!

    There is no problem with inserting data!
    Only there is no data! This means that your select statement retrieves no rows.
    You can see the output of your program (0). This means that there where no line in the result set.

    Please check the output of your tax return independently:

    SELECT
    --        regal.regal_inv_landed_cost_seq.nextval,      --Interface_transaction_id
     --       V_A,                                          --Header Interface ID
    --        V_B,                                          --Group ID
            'Ship',                                       --Transaction Type
            sysdate,                                      --Transaction Date
            'PENDING',                                    --Processing Status Code
            'BATCH',                                      --Processing Mode Code
            'PENDING',                                    --Transaction Status Code
            lc.quantity_received,                          --Quantity
            lc.last_update_date,                          --last update date
            lc.last_updated_by,                           --last updated by
            sysdate,                                      --creation date
            lc.created_by,                                --created by
            'INVENTORY',                                  --Receipt source Code
            'INVENTORY',                                  --Destination Type Code
            'DELIVER' ,                                    --AUT Transact Code
            'INVENTORY',                                  --Source Document Code
             msi.primary_uom_code ,                       --Unit Of Measure
             msi.inventory_item_id,                        --Item ID
             msi.primary_unit_of_measure,                  --UOM COde
             fnd.user_id,
      --       V_A,                                         --Shipment Header ID
    --         V_B,                                         --SHipment Line ID
             82,                                           --To Organization ID
             'Brooklyn',                                     --Sub Inventory ID
             81,                                            --From Organization
             'Vessel'                                       --From Subinventory
         FROM
            regal.regal_inv_landed_cost_tab lc,
            fnd_user fnd,
            mtl_system_items msi
         WHERE
            lc.organization_id = msi.organization_id
            AND  lc.inventory_item_id = msi.inventory_item_id
            AND  lc.created_by = fnd.created_by;
    

    Published by: hm on 13.10.2011 23:19

    I removed the references of the sequence and the variables V_A and YaeUb.
    BTW: Why do you want to include V_A and YaeUb in two different columns?

    The use of sequences in your code seems a bit strange to me. But this has nothing to do with your question.

  • Stuck with ORA-30937 when inserting XML in the table...

    Hello

    We are in 10 gr 2 (10.2.0.3.0)

    I've never been so far with XMLs...
    and I followed as well as Marc can messages and XML and relational views:
    DB XML FAQ
    View relational content XML.
    XMLType view relational content

    I have saved the schema, renamed tables XMLTYPE that I needed...
    but when I try to insert my XML data in the XMLTYPE, I get this error:
    ORA-30937: no schema definition for 'WORKBENCH_PROJECT' (namespace ") in parent ' / '.


    I think I need to display the xml, xsd, and code as well:

    XML is:
    <? XML version = "1.0"? >
    < WORKBENCH_PROJECT >
    < BaseCalendars >
    < calendar
    name = "Standard" lastUpdatedDate = "2001-07 - 10 T 09: 04:08" >
    < / calendar >
    < calendar
    name = "Tunbase" lastUpdatedDate = "" 2008-02 - 21 T 12: 01:30 ' lastUpdatedBy = "sacchaud" > "
    < days >
    < day departure = '2008-01-01' isWorkDay = "false" / >
    < day departure = finishing '2008-03-20' = '2008-03-21' isWorkDay = "false" / >
    < day departure = "2008-04-09" isWorkDay = "false" / >
    < day departure = '2008-05-01' isWorkDay = "false" / >
    < day departure = '2008-07-25' isWorkDay = "false" / >
    < day departure = '2008-08-13' isWorkDay = "false" / >
    < day departure = "2008-11-07" isWorkDay = "false" / >
    < / days >
    < / calendar >
    < calendar
    name = 'SPAIN-BASE' lastUpdatedDate = "" 2008-11 - 28 T 10: 11:53 ' lastUpdatedBy = "ashwkulk" > "
    < days >
    < day departure = '2008-01-01' isWorkDay = "false" / >
    < day departure = "2008-01-07" isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day departure = '2008-03-20' isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day departure = '2008-03-21' isWorkDay = "false" / >
    < day departure = '2008-05-01' isWorkDay = "false" / >
    < day departure = '2008-08-15' isWorkDay = "false" / >
    < day departure = '2008-10-13' isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day departure = "2008-12-08" isWorkDay = "false" / >
    < day departure = '2008-12-25' isWorkDay = "false" / >
    < day departure = '2009-01-01' isWorkDay = "false" / >
    < day departure = "2009-01-06" isWorkDay = "false" / >
    < day departure = '2009-04-10' isWorkDay = "false" / >
    < day departure = '2009-05-01' isWorkDay = "false" / >
    < day departure = '2009-10-12' isWorkDay = "false" / >
    < day departure = "2009-12-08" isWorkDay = "false" / >
    < day departure = '2009-12-25' isWorkDay = "false" / >
    < / days >
    < / calendar >
    < / BaseCalendars >
    < PoolResources >
    < PoolResource
    resourceType = '0' inputTypeCode = '0' ADO = "FGASNIER" userFlag2 = "false" userFlag1 = "false".
    fullName = "Gasnier Florian" firstName = "Florian" isExternal = "false" isActive = 'true '.
    ResourceID = "FGASNIER" managerUserName = "PIDUPUIS" employmentType = "3" userNumber2 = "0.0".
    userNumber1 = '0,0' userText2 = 'POWEO' userText1 = "' UDDI EUC + ' openForTimeEntry = 'true'"
    emailAddress = '[email protected]' LastName As String = "Gasnier" isRole = "false" trackMode = "2" >
    < Calendar CalendrierBase = 'FRANCE' >
    < days >
    < day departure = '2008-12-26' isWorkDay = "false" / >
    < day departure = "2009-03-23" Finish = "2009-03-25" isWorkDay = "false" / >
    < / days >
    < / calendar >
    < curve name = 'availability' type = '1' default = "1.0" / >
    < / PoolResource >
    < PoolResource
    resourceType = '0' inputTypeCode = '0' ADO = "mmazelei" userFlag2 = "false" userFlag1 = "false".
    fullName = "Kounde, Guillaume" firstName = "Guillaume" isExternal = "false" isActive = 'true '.
    ID = "GKOUNDE" managerUserName = "PIDUPUIS" employmentType = "3" userNumber2 = "0.0".
    userText3 = "RE7' userNumber1 = '0,0' userText2 = 'Poweo' userText1 =" ' UDDI EUC + ' openForTimeEntry = 'true' "
    emailAddress = '[email protected]' LastName As String = "Kounde" isRole = "false" trackMode = "2" >
    < Calendar CalendrierBase = 'FRANCE' >
    < days >
    < / days >
    < / calendar >
    < curve name = 'availability' type = '1' default = "1.0" / >
    < / PoolResource >
    < / PoolResources >
    <>projects
    < project
    UID = "AJWF [& quot;" / A_ "'? & quot; GW:R'! '''? "P" ' 0 "baseTime =" "2008-10 - 02T 17: 33:10" closed = 'false' "
    Active = 'true' approved = 'false' userText2 = 'Poweo' userText1 = '& amp; "D EUC +" start = "" 2008-10 - 02T 08: 00:00 ""
    openForTimeEntry = 'true' format = '0' trackMode = '2' lastUpdatedDate = "" 2009-03 - 09 T 17: 25:03 ""
    "baseFinish =" "2008-10 - 02T 17: 00:00" end = "2012-12 - 31 T 17: 00:00 ' baseStart =" "2008-10 - 02 T 08: 00:00" "
    priority = "10" finishImposed = "true" cpmType = "0" name = 'ID-ID-Poweo recipe' startImposed = 'false '.
    program = 'false' lastUpdatedBy = "lletaill" >
    baseline <>
    < baseline
    Description = "P.Dupuis pilgrims © ation" code = 'Main' name = "ReferencePrincipale20081002" "
    current = "true" / >
    < / basic lines >
    < resources >
    < resource
    requestStatus = '1' lastUpdatedBy = "JRATAJAK" resourceID = "lletaill" openForTimeEntry = "true".
    lastUpdatedDate = "" 2009-01 - 06 T 16: 10:59 "bookingStatus ="15">"
    < curve name = "allowance" type = "1" default = "1.0" / >
    < curve name = 'rate' type = '1' default = "1.0" >
    <>segments
    "< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
    < / segment >
    "< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    < / segments >
    < / curve >
    < / resource >
    < resource
    requestStatus = '1' lastUpdatedBy = "EDAUDIFF" resourceID = "EDAUDIFF" availTo = "" 2009-02 - 14 T 00: 00:00 ""
    openForTimeEntry = "false" lastUpdatedDate = "" 2009-02 - 16 T 15: 09:50 "bookingStatus ="15">"
    < curve name = "allowance" type = "1" default = "1.0" / >
    < curve name = 'rate' type = '1' default = "1.0" >
    <>segments
    "< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
    < / segment >
    "< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    < / segments >
    < / curve >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / resource >
    < resource
    requestStatus = '1' lastUpdatedBy = "JRATAJAK" resourceID = "JZARIOUH" availTo = "" 2010-12 - 31 T 17: 00:00 ""
    "openForTimeEntry ="true"availFrom =" "2009-01 - 05 T 00: 00:00" lastUpdatedDate = "2009-01 - 05 T 15: 19:32.
    bookingStatus = "15" >
    < curve name = "allowance" type = "1" default = "1.0" / >
    < curve name = 'rate' type = '1' default = "1.0" >
    <>segments
    "< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
    < / segment >
    "< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    < / segments >
    < / curve >
    < / resource >
    < / resource >
    < task
    UID = "AJ; & apos; Y6'? 1_'' ' ? & quot; GW:R'! '''? ' "P" ' 0 "baseTime =" "2008-10 - 02T 17: 33:10" start = "2009-02 - 16 T 08: 00:00.
    proxy = 'false' critical = "false" status = '0' lastUpdatedDate = "" 2009-03 - 09 T 17: 25:03 "outlineLevel = '3'"
    "baseFinish =" "2008-10 - 02T 17: 00:00" end = "2009-02 - 16 T 17: 00:00 ' summary = 'false' baseStart =" "2008-10 - 02 T 08: 00:00" "
    baselineDuration = "1.0" milestone = "false" name = "RE7 - awareness" fixed = "false".
    Locked = 'false' key = 'false' lastUpdatedBy = "lletaill" percComp = "0,0" unexpected = "false" >
    <>assignments
    < assignment
    status = '0' lastUpdatedBy = "lletaill" actualWork = "0,0" ResourceID = "EDAUDIFF" start = "" 2009-02 - 16 T 08: 00:00 ""
    baselineWork = "144000.0" unplanned = "false" estPattern = "3" actualThrough = "" 2009-02 - 16 T 00: 00:00 ""
    «Finish = "" 2009-02 - 16 T 17: 00:00 "="144000.0"remainingWork lastUpdatedDate =" 2009-03 - 09 T 17: 25:03»
    estMax = "1.0" >
    < curve name = "basic" type '2' default = '0.0' = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" >
    < calendar >
    < days >
    < day dayOfWeek = 'SUN' isWorkDay = "false" / >
    < day dayOfWeek = 'MY' isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day dayOfWeek = 'SAT' isWorkDay = "false" / >
    < / days >
    < / calendar >
    < / segment >
    < / segments >
    < / curve >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / assignment >
    < / assignments >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / task >
    < / tasks >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "2566.4" usageSum = "288000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.08911111111111111" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "10.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / project >
    < / project >
    < / WORKBENCH_PROJECT >

    -------------------------------
    XSD is (it was automatically generated by the "Stylus Studio" tools... so I changed a few stuffs up):
    <? XML version = "1.0" encoding = "UTF-8"? >
    < xsd: Schema targetNamespace = "http://www.oracle.com/xsd/projet.xsd."
    container = "http://www.w3.org/2001/XMLSchema" elementFormDefault = "unqualified".
    xmlns:xdb = "http://xmlns.oracle.com/xdb".
    xdb:storeVarrayAsTable = 'true '.
    xmlns = "http://www.oracle.com/xsd/projet.xsd" >
    < xsd: element name = "WORKBENCH_PROJECT" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "BaseCalendars" / >
    < xsd: ELEMENT ref = "PoolResources" / >
    < xsd: ELEMENT ref = "Projects" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "BaseCalendars" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Calendar" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "PoolResources" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "PoolResource" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "PoolResource" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Calendar" / >
    < xsd: ELEMENT ref = "Curve" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "category" / >
    < xsd: attribute name = "emailAddress" / >
    < xsd: attribute name = "employmentType" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "FirstName" type = "xsd:NCName" / >
    < xsd: attribute name = "full name" use = "required" / >
    < xsd: attribute name = "hireDate" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "inputTypeCode" type = "xsd: Integer" / >
    < xsd: attribute name = "isActive" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "isExternal" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "isRole" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "lastName" use = "required" / >
    < xsd: attribute name = "managerUserName" type = "xsd:NCName" / >
    < xsd: attribute name = "ADO" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "Resource ID" use = "required" / >
    < xsd: attribute name = "resourceType" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "trackMode" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "userFlag1" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "userFlag2" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "userNumber1" type = "xsd: Decimal" / >
    < xsd: attribute name = "userNumber2" type = "xsd: Decimal" / >
    < xsd: attribute name = "userText1" / >
    < xsd: attribute name = "userText2" type = "xsd:NCName" / >
    < xsd: attribute name = "userText3" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Projects" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Project" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Project" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Baselines" / >
    < xsd: ELEMENT ref = "Resources" / >
    < xsd: ELEMENT ref = "Tasks" / >
    < xsd: ELEMENT ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "UID" = "required" / >
    < xsd: attribute name = "active" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "authorized" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "baseFinish" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "baseStart" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "baseTime" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "closed" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "cpmType" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "finishImposed" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use 'format' = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "name" use = "required" / >
    < xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "priority" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "programs" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "startImposed" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "trackMode" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "userText1" use = "required" / >
    < xsd: attribute name = use "userText2" = "required" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Base lines" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Baseline" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "basic" >
    < xsd: complexType >
    < xsd: attribute name = "code" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "use" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "description" use = "required" / >
    < xsd: attribute name = "name" use = "required" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Resources" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Resource" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Resource" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Curve" / >
    < xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "availFrom" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "availTo" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "bookingStatus" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = 'requestStatus' use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "Resource ID" use = "required" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Tasks" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Task" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Task" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Assignments" / >
    < xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "UID" = "required" / >
    < xsd: attribute name = "baseFinish" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "baseStart" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "baseTime" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "baselineDuration" type = "xsd: Decimal" / >
    < xsd: attribute name = "category" / >
    < xsd: attribute name = "critical" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use 'fixed' = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use 'key' = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use 'locked' = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "milestone" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "name" use = "required" / >
    < xsd: attribute name = "outlineLevel" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "percComp" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = using the "proxy" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "status" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "summarized" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "unexpected" use = "required" type = "xsd: Boolean" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Assignments" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Assignment" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Assignment" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = "0" maxOccurs = "unbounded" ref = "Curve" / >
    < xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "actualThrough" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "actualWork" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "baselineWork" type = "xsd: Decimal" / >
    < xsd: attribute name = use "estMax" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = use "estPattern" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "Finish" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "pendActSum" type = "xsd: Decimal" / >
    < xsd: attribute name = "pendEstSum" type = "xsd: Decimal" / >
    < xsd: attribute name = use "remainingWork" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "Resource ID" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "DΘmarrer" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "status" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "unexpected" use = "required" type = "xsd: Boolean" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Calendar" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = 'Days' / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "CalendrierBase" / >
    < xsd: attribute name = "lastUpdatedBy" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "name" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Days" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = "0" maxOccurs = "unbounded" ref = "Day" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Day" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Travel" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "dayOfWeek" type = "xsd:NCName" / >
    < xsd: attribute name = "Finish" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "isWorkDay" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "DΘmarrer" type = "xsd:NMTOKEN" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Travel" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Shift" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Shift" >
    < xsd: complexType >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Curve" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Segments" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "default" use = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "name" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = use "enter" = "required" type = "xsd: Integer" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Segments" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Segment" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Segment" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Calendar" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "rate" use = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "BaselineDetails" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "BaselineDetail" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "BaselineDetail" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Curve" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "baselineCode" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = use "costSum" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "duration" use = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "usageSum" = "required" type = "xsd: Decimal" / >
    < / xsd: complexType >
    < / xsd: element >
    < / xsd: Schema >


    ---------------------------
    Here is the procedure for registration of the scheme and rename XMLTYPE tables:
    PROCEDURE install_schema (p_schema IN VARCHAR2)
    IS

    l_res BOOLEAN;
    l_nested_table_name VARCHAR2 (50);
    l_parent_table_name VARCHAR2 (50);
    l_iot_index_name VARCHAR2 (50);
    l_continue BOOLEAN: = TRUE;

    BEGIN

    BEGIN
    -load XSD/XML in the table
    sipmo_XML_utils.charger_xml ('XSD_DIR', p_schema);
    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' error loading of in, err ='|) SQLERRM);
    l_continue: = FALSE;
    END;

    IF l_continue = TRUE
    THEN
    -Diagram of the removal
    BEGIN
    dbms_output.put_line ('deleteSchema in progress...) ');
    -"projet.xsd".
    () DBMS_XMLSCHEMA.deleteSchema
    SCHEMAURL = > 'http://www.oracle.com/xsd/ ' | p_schema
    , DELETE_OPTION = > dbms_xmlschema. DELETE_CASCADE_FORCE);
    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' ko deleteSchema ' |) SQLERRM);
    NULL;
    END;
    END IF; -l_continue = TRUE

    -Removal of resources:
    IF l_continue = TRUE
    THEN
    IF (dbms_xdb.existsResource ('/ public /'| p_schema))
    THEN
    DBMS_XDB.deleteResource ('/ public /'| p_schema);
    END IF;
    l_res: = dbms_xdb.createResource ('/ public /'| p_schema, BFILENAME ('XSD_DIR', p_schema));

    IF l_res
    THEN
    dbms_output.put_line ('createresource OK');
    ON THE OTHER
    dbms_output.put_line ('createresource KO');
    END IF;
    END IF; -l_continue = TRUE

    -Schema of creation of the:
    IF l_continue = TRUE
    THEN
    BEGIN
    dbms_output.put_line ('REGISTERSCHEMA in progress...) ');
    DBMS_XMLSCHEMA. REGISTERSCHEMA)
    SCHEMAURL = > 'http://www.oracle.com/xsd/ ' | p_schema
    , SCHEMADOC = > BFILENAME ('XSD_DIR', p_schema)
    , CSID = > NLS_CHARSET_ID ('AL32UTF8')
    local = > TRUE
    , genTypes = > TRUE
    , genBean = > FALSE
    genTables = > TRUE);

    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' ko REGISTERSCHEMA ' |) SQLERRM);
    l_continue: = FALSE;
    END;
    END IF; -l_continue = TRUE
    COMMIT;

    IF p_schema = "projet.xsd".
    AND l_continue = TRUE
    THEN
    dbms_output.put_line (' XML rename tables ' | p_schema);

    -First... the enventuelle dropper table main "WORKBECH_PROJECT."
    BEGIN
    EXECUTE IMMEDIATE ' drop table 'WORKBENCH_PROJECT "";
    EXCEPTION
    WHILE OTHERS THEN
    NULL;
    END;

    -Resource table
    Select table_name
    in l_nested_table_name
    of user_nested_tables
    where parent_table_column = ' "XMLDATA". "" "" PoolResources '. "" PoolResource' '
    and parent_table_name like '% WORKBENCH_PROJECT ';

    EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_RESSOURCES ';

    Select index_name
    in l_iot_index_name
    from user_indexes
    where table_name = 'PROJET_RESSOURCES '.
    and index_type = 'IOT - TOP';

    Index of IMMEDIATE'alter EXECUTE ' ' |. ' l_iot_index_name |' "and rename it PROJET_RESSOURCES_I1';

    -Table projects/tasks
    Select table_name
    in l_nested_table_name
    of user_nested_tables
    where parent_table_column = ' "XMLDATA". "Projects '." "Project '." "" Task"". "" The task""
    and parent_table_name like '% WORKBENCH_PROJECT ';

    EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_TACHES ';

    Select index_name
    in l_iot_index_name
    from user_indexes
    where table_name = 'PROJET_TACHES '.
    and index_type = 'IOT - TOP';

    EXECUTE IMMEDIATE ' alter index ' ' |. ' l_iot_index_name |' "and rename it PROJET_TACHES_I1';

    -Table of the project/tasks/Activities and (+ main table)
    Select table_name, parent_table_name
    in l_nested_table_name
    l_parent_table_name
    of user_nested_tables
    where parent_table_column = ' "XMLDATA". "Projects '." "Project '." "" "" BaselineDetails '. "" "" "BaselineDetail '." " Curve"'
    and parent_table_name like '% WORKBENCH_PROJECT ';

    EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_ACTIVITES ';

    Select index_name
    in l_iot_index_name
    from user_indexes
    where table_name = 'PROJET_ACTIVITES '.
    and index_type = 'IOT - TOP';

    EXECUTE IMMEDIATE ' alter index ' ' |. ' l_iot_index_name |' "and rename it PROJET_ACTIVITES_I1';

    -Main table WORKBENCH_PROJECT
    EXECUTE IMMEDIATE "Rename" ' | "" l_parent_table_name | "" "to WORKBENCH_PROJECT ';


    dbms_output.put_line ('rename XML tables... end');
    ON THE OTHER
    dbms_output.put_line (' rename XML tables...) NOT DONE ");"
    END IF; -p_schema = "projet.xsd".

    END install_schema;


    ---------------------------------------
    Here is the procedure of inserting data into XMLTYPE table (where I get the error)

    * insert into WORKBENCH_PROJECT values (xmltype (bfilename('XML_DIR','P21002635_2.xml'), nls_charset_id ('AL32UTF8'))); *

    + In my idea, I think I should load the full XML in my table XMLTYPE WORKBENCH_PROJECT... +.
    and more and then interrogate him with better performance... more

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

    Note that the same XML file is already loaded into a table containing an XMLTYPE column...
    So, I really wonder if I need to do both?

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

    In any case, I hope that you will be able to help me... and that my explanation is clear...

    Thanks in advance,
    Olivier

    Oliver

    I don't know where you got the impression that I said that the DOM would be better. It will be definitely worse. The only advantage of the evaluation of DOM based (or functional) is that it can handle a much wider range of XQuery and XPath expressions. However there is nothing in what I saw in your examples the SQL execution path is not be be able to manage the only way you get the performance you need is to get the work of path of execution of SQL. To get the job of re - write, you will need to avoid wildcards and get the fix for the bug.

    I hate to disappoint you, but your XML schema is actually quite simple, it is certainly not in a class, that I would not complex, for recording results in a hierarchical structure very simple, unique, with 42 nested tables, if you want to see an example of something I would consider as complex search the Web for the FpML or NIEM schemas , recording these patterns result in recursive structures with multiple nested tables 1000!

    I see nothing in your XML schema that would make the use of wildcard characters required (with the exception of running in this bug). For tasks and Instance/tasks / * are identical in your use case as a tasks element can contain one or more elements of task, not do I see anything that would make me think that some how transform XML CSV would make it easier to load.

    My number 1 recommendation is to apply the 10.2.0.4.0 patch or upgrade to GR 11, 1 material. According to your deadlines, you can also consider 11 GR 2 beta.

    -Mark

    Published by: mdrake on April 10, 2009 14:28

  • Need help to insert rows in the table to a custom table area

    Hi all

    I have a requirement as below.

    I have a page of the i invoke a popup search page and displaying the table data in the area of the table, this table I select lines and pressing the button and given in the basic page in the region of the table being filled, of data, I need to insert these lines into a custom table. Please help me how to achieve this. Basically, I need to insert rows from one table to a custom table region.

    Thnaks

    Hello

    Review the link, below, may be it will help you:

    https://forums.Oracle.com/thread/953885

    https://forums.Oracle.com/thread/2151775

    Please share your solution here, it will help others.

    Concerning

    Mahesh

  • What trigger to use to insert data into the table db forms

    Hello

    My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
    I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
    Is - shutter release key of the form-level validation?

    Please notify.

    Thank you
    Didi.

    You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.

    Hi didi.
    And this is my last post I'll sleep. ;)
    Take form level trigger named preform
    and write on it

    :SYSTEM.MESSAGE_LEVEL := 5;
    

    I hope this works...

    Hamid

    Mark correct/good to help others to get the right answers. *

  • inserting data into the table

    Hi all
    I use forms [32 bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    I have settings such as the (optional) emp_code and the year (mandatory field - four digits).
    Based on the setting that I have to get the detail of a table and these must be inserted at the other table with columns of additions (to hardcode the additional columns).
    To achieve this, I intend to get a cursor by selecting the required fields in the table by the way the where clause of the cursor parameters.
    by making a loop through the cursor I will insert the records in the other table.
    Here, the thing is that the data is going to be huge (since the year is the parameter).
    so my approach causes the performance issue.
    I heard that there is a different method of insetions
    can anyone suggest me the best way (performance wise) other than what I mentioned (if you are aware of)...

    Thank you...

    user13329002 wrote:
    Thanks for everyone.
    I have to take the data from the table as e_name, e_code, of the table and insert it into another table with some other values such as
    e_name, e_code, as well as I add 'n', 'o'.
    its something like

    insert into e_emp(emp_name,emp_code,emp_add,emp_status,emp_type)
    select e_name,e_code,e_add,'O','N')
    from e_table
    where e_date = Parameter.
    

    in other words, the values for Emp_status, emp_type I have no values in the e_table.so table and enter in e_table I have to hard code it.
    CAL I hard code as I mentioned in my statement example

    can someone clear me of the foregoing.

    Thank you...

    Published by: user13329002 on February 15, 2011 20:11

    Yes... You can hardcode the values for Emp_status, emp_type.

    SQL> CREATE TABLE e_emp(emp_code NUMBER(10),emp_status VARCHAR2(1),emp_type VARCHAR2(1));
    
    Table created.
    
    SQL> create table e_table as (select * from e_emp);
    
    Table created.
    
    SQL> INSERT INTO e_table(emp_code) VALUES('1111');
    
    1 row created.
    
    SQL> insert into e_table(emp_code) values('2222');
    
    1 row created.
    
    SQL> select * from e_table;
    
      EMP_CODE E E
    ---------- - -
          1111
          2222
    
    SQL> insert into e_emp(emp_code,emp_status,emp_type) (select emp_code,'0','N' from e_table);
    
    2 rows created.
    
    SQL> select * from e_emp;
    
      EMP_CODE E E
    ---------- - -
          1111 0 N
          2222 0 N
    
    SQL> 
    

    I hope this helps.

    Kind regards
    Claudy

  • How to insert rows in multiple tables in a sql

    I want to know how to insert multiple lines in a single sql statement.

    Let's insert records into the table emp and dept in a sql statement.


    Thank you

    It's here

    SQL>l
      1  insert all
      2    into emp values(8888,'WADE','MANAGER',7839,'01-MAR-2008',5000,100,20)
      3    into dept values(50,'MARKETING','NEW YORK')
      4* select * from dual
    SQL> /
    
    2 rows created.
    

    SS

  • How to insert data into the table by using the expression builder in the assign activity

    How to insert data into the table by using the expression builder in affect business in BPEl, I use SOA Suite 11.1.1.5
    Can someone help me please

    Hello

    I don't think that oraext:query-database() can insert data into the table.

    What are your needs?
    Can not you plan to use the DB adapter with the insert operation?

    Kind regards
    Neeraj Sehgal

Maybe you are looking for