How to import spreadsheet into relational database?

I hope this is the best forum for placing this type of question. I had a general question regarding what are the best/accepted methods for doing this type of thing. XML? Web Services? Combination of things?
I have an existing Oracle relational database, containing several tables. From the client, I receive bulk amount of data (in Excel spreadsheet format) that needs to be directly imported into the database (while respecting all of the integrity and foreign key constraints). The data from the spreadsheet cannot be directly dumped into one table. For example, if you have information in the spreadsheet that captures Country and the user has entered in 'Spain'. You would have to look up 'Spain' in the Countries Table to retrieve its id value and then use this as a foreign key value in the appropriate table.
So my question is, how do I go about doing this? What steps and what technologies are best in achieving this goal? I am thinking XML should play a part in this somehow. I have played around with a trial version of XMLSpy and generated an xsd file from my database, but I am not sure where to go from there. My IDE is IBM RAD 7, however I am not sure if I should try doing this separate from the actual application or not.
Please advise. Any ideas or feedback of previous experience regarding this type of task is greatly appreciated.
Thanks.

You have some arbitrary data somewhere in an Excel spreadsheet. You're going to need some code which knows where that data is and how to get at it. You weren't planning for any such code? Or were you hoping it would somehow happen automatically? I don't seem to be following your understanding of the problem at all.
Here's how I see it:
1. Get the data from the spreadsheet.
2. Update the database with that data.
You have to do both of these things. You can hard-code the bit which says "get the order quantity from cell J6" or you can write your own language that allows you to say that outside Java, it doesn't really matter. This could be XML if you're determined to get XML in there somehow. But you are going to need code that reads the spreadsheet.

Similar Messages

  • How to retrieve Outline Into Relational Database??

    sir i have installed Hyperion and SQL server 2008 On my system ..
    I am working on ETL process .
    I have OUTLINE DATABASE OTL FILE that i have to retrieve in RELATIONAL DATABASE MDF FILE...
    so how can I do this??
    thanking you for view this question and giving me answer...

    Hi,
    Depends on what products you are willing to use, personally I would use ODI to extract the outline information and then load into a table, another option would be use the applied olap outline extractor (which is free) or you could use one of the APIs and write the code to extract and load.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to import metadata into EPMA application by using ODI

    Hi All,
    1.Can you tell anyone, how to import metadata into EPMA application by using ODI. Detailed steps with screen shots will be appreciated.
    2. What was the interface tables. How the interface tables will be useful while importing metadata into EPMA application (Detailed steps with screen shots will be appreciated.). And tell me the interface tables structure and work process. give me the clear idea bout interface tables. I don't know anything about interface tables.
    3.Which method(either using ODI or Interface tables) is optimized/bestcase for importing metadata into EPMA application.
    My database is Oracle 10g and I am using Planning 9.3.1.
    Thanks in advance.
    Thanks And Regards,
    Bhagya Lakshmi.

    Hi,
    Answer to your questions
    1. You can't import metadata directly into EPMA using ODI, the only option is use the EPMA interface tables which is your question 2.
    2. Interface tables are just a structure of database tables which you populate with metadata and then this is pushed into EPMA, the structure of the tables takes a while to get an understanding of. The best place to start would be the documentation :- http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/bpma_admin.pdf
    3. As explained in question 1 you can't use ODI directly to import metadata into EPMA but with a lot of hard work and effort you could probably populate interface tables from EPMA, though I must admit I am not a fan of the interface tables because I don't think they were designed with simplicity and ease of use in mind.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to updated matrix into related table?

    hi, can anyone help me below coding how to updated matrix into related table?
    Thank you.
                For rowNum = 0 To oMatrix.RowCount
                    oRecordset.Fields.Item("Code").Value = oMatrix.Columns.Item("DSCode").Cells.Item(rowNum).Specific.Value
                    oRecordset.Fields.Item("Name").Value = oMatrix.Columns.Item("DSName").Cells.Item(rowNum).Specific.Value
                    oRecordset.Fields.Item("U_RPTC").Value = oMatrix.Columns.Item("DSReport").Cells.Item(rowNum).Specific.Value
                    oRecordset.Fields.Item("U_USRC").Value = oMatrix.Columns.Item("DSUser").Cells.Item(rowNum).Specific.Value
                    oRecordset.MoveNext()
                Next

    For Fast Matrix Loading you can user some thing like this.
            Dim Column As SAPbouiCOM.Column
            Dim Matrix As SAPbouiCOM.Matrix
            Dim Table As SAPbouiCOM.DataTable
            Table = oForm.DataSources.DataTables.Add("Documents")
            Table.Columns.Add("Code", SAPbouiCOM.BoFieldsType.ft_Integer)
            Table.Columns.Add("Name", SAPbouiCOM.BoFieldsType.ft_Integer)
            Table.Columns.Add("U_RPTC", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric, 255)
            Table.Columns.Add("U_USRC", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric, 255)
            Matrix = oForm.Items.Item("MatrixUID").Specific
            Column = Matrix.Columns.Item("Code")
            Column.DataBind.Bind("Documents", "Code")
            Column = Matrix.Columns.Item("Name")
            Column.DataBind.Bind("Documents", "Name")
            Column = Matrix.Columns.Item("U_RPTC")
            Column.DataBind.Bind("Documents", "U_RPTC")
            Column = Matrix.Columns.Item("U_USRC")
            Column.DataBind.Bind("Documents", "U_USRC")
            Table.ExecuteQuery(SQLQuery)
            Matrix.LoadFromDataSource() 'Load The Data to the Matrix
    To pull the data form the display back to the Table you can use this
    Matrix.FlushToDataSource()

  • How to import swc into Adobe Flash CS3 ?

    I use following command to create a swc file,such as test.swc, there is a file named test.swf in myapp directory
    compc -include-sources myapp -output test.swc
    then I copy test.swc into Adobe Flash CS3\zh_cn\Configuration\Components directory, Then I restart Adobe Flash CS3,and create a file and press ctrl+f7, but I don't find test.swc!  Why? Where is wrong? How to import swc into Adobe Flash cs3?
    Thanks

    If you want to embed videos in your muse site, without using a service like youtube or vimeo, then you will need to manually upload the video files on the server and use them via the video tag available in html5, HTML5 Video
    To insert the video tags in your muse pages, you will need to use the 'Object -> Insert HTML' option.
    Since this option is not available in Muse, out of the box, I will recommend that you post this on our ideas section over here, https://forums.adobe.com/community/muse/ideas, and let our devs team know of this requirement.
    - Abhishek Maurya

  • How to import video into adobe muse?

    how to import video into adobe muse?

    If you want to embed videos in your muse site, without using a service like youtube or vimeo, then you will need to manually upload the video files on the server and use them via the video tag available in html5, HTML5 Video
    To insert the video tags in your muse pages, you will need to use the 'Object -> Insert HTML' option.
    Since this option is not available in Muse, out of the box, I will recommend that you post this on our ideas section over here, https://forums.adobe.com/community/muse/ideas, and let our devs team know of this requirement.
    - Abhishek Maurya

  • My i phone was stolen and now I need to upload my contact to my i cloud from my I tunes...any ideas how to import contacts into i cloud, with either i tunes or with old iphone

    My i phone was stolen and now I need to upload my contacts to my i cloud from my I tunes...any ideas how to import contacts into i cloud, with either i tunes or with old iphone?

    If you have the contacts on the phone you can sync the phone to the computer. The contacts should then show in address book. At this point you can sync the address book data to iCloud. You have to make sure the iCloud account is setup on the computer and this will not work unless the computer is running 10.7.2 of course. There are other ways to add the contacts to iCloud like through the phone but the phone must be running iOS5. If it is you can simply add the cloud account to the phone and toggle the contacts slider. You will get a prompt to keep or delete the contact data. Of course you keep. Then you will get a prompt to merge at which point you do. This should merge the contacts on the phone with iCloud. Hope this helps.

  • Can anyone tell me how to import vCard into iCloud??

    Whenever i try to import a vCard from my pc into iCloud, it always shows a message that, "1 contact couldn't be imported because there was a problem reading the vCard" Can anyone tell me how to import vCard into iCloud??

    Hey,
    Yes, a lot of people have this question actually. You need to import it like it's a video and then find iPhoto in the import window to do it. Check out this site. It shows you exactly how to do this.
    http://imovietutorialhelp.com/how-to-import-video-into-imovie-from-iphoto.html
    The iMovie Guy
    I may receive some form of compensation, financial or otherwise, from my video or link.

  • How to import Photos into Active Directory

    Hi -
    IT Director asked me to import employees pictures into Active Directory so that we can use them in Outlook, SharePoint, Lync etc.
    Do you know how to import pictures into Active Directory?

    Thumbnailphoto Attribute in active directory is responsible for adding photos to Active directory.
    By Default Replication of this attribute will be disabled to Global catalog server. To make use of this facility we will have to enable replication of this attribute to Global Catalog. ( To accomplish this you will have to edit the schema using Active directory
    schema snap in).
    Refer Below link which explains about enabling the replication of Thumbnailphoto attribute to Global catalog.
    http://www.msexchange.org/articles_tutorials/exchange-server-2010/management-administration/configuring-using-display-picture-exchange-server-2010.html
    Requirements
    Minimum requirement for your exchange enviornment to use this - Exchange 2010.
    Exchange 2007 Don't support uploading photos AFAIK.
    Domain controller should be running with atleast windows server 2008 or later. And
    schema has to be windows server 2008
    Additionally for your information,
    How to remove the uploaded photos?
    Either You can edit the Thumbnailphoto attribute using ADSIedit and remove the entry which is assocaited with Thumbnailphoto attribute.
    Or,
    Try this.
    The Import-RecipientDataProperty and Export-RecipientDataProperty cmdlets allow you to import and export the photo blob to and from
    thumbnailPhoto attribute, but there's no Remove-RecipientDataProperty cmdlet to remove it. You can use the
    RemovePicture switch of Set-Mailbox cmdlet to remove a user's photo. For example:
    Set-Mailbox "Bharat Suneja" -RemovePicture
    Check out the below link which explains in and out of uploading photos,
    http://blogs.technet.com/b/exchange/archive/2010/06/01/gal-photos-frequently-asked-questions.aspx
    http://blogs.technet.com/b/ilvancri/archive/2009/11/17/upload-picture-in-outlook-2010-using-the-exchange-management-shell-exchange-2010.aspx
    To know about uploading photo using powershell ask this question in powershell forum
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/threads
    Regards,
    _Prashant_
    MCSA|MCITP SA|Microsoft Exchange 2003 Blog - http://prashant1987.wordpress.com Disclaimer: This posting is provided AS-IS with no warranties/guarantees and confers no rights.

  • How to import DLU into CCM

    Hi everyone
         I am a voice amatuer, so who can tell me how to import DLU into CCM. I never did it. please tell me the detail step.
    Thanks

    Hi
    In general:
    1) You receive an 11-digit PAK code from Cisco.
    2) Go to www.cisco.com/go/license, and register the PAK code. For this you need your CCM licensing MAC address; one way to find this is go to CCMAdmin (ccmpublisher/ccmadmin), log in, go to System/Licensing/Upload License, then view an existing license to see what the 'host' part refers to. Another is to go to ccmpublisher/cmplatform, log in, and go to Show/Network.
    3) You receive a .lic file from Cisco via email
    4) Log into the CCM Publisher at ccmpublisherip/ccmadmin
    5) Go to system/licensing/Upload License and upload your file
    Regards
    Aaron
    Please rate helpful posts...

  • How to import javafx into a existing web application??

    how to import javafx into a existing web application in netbeans 6.5??

    how to import javafx into a existing web application in netbeans 6.5??

  • How to import MP4 into iMovie 09

    How to import MP4 into iMovie09

    You will need to convert it to something that iMovie can edit.
    1) The first step is to see if QuickTime can play it. See if you can open it in QuickTime Player.
    If you can, Proceed to Step 3
    2) If QuickTime cannot play it, I would try to download a set of open source codecs called Perian. They will handle many odd codecs like this. Go to Perian.ORG and download them. Then go back to step 1.
    Note: If Perian does not work for you, come back for some more ideas.
    3) Once QuickTime can play it, you need to convert it to something iMovie can edit. If you have QuickTime Pro, use that. If you would prefer a free alternative, download MPEG STREAMCLIP from Squared 5. Drag the 3G2 clip into MPEG Streamclip and then FILE/Export to QuickTIme...
    Choose Apple Intermediate Codec (for highest quality) or choose h.264 (for smallest file size) and save it in a place you can find it.
    4) Now open iMovie, and use FILE/IMPORT...MOVIES to import the converted file into iMovie for editing.

  • How to import albums into a Smart playlist

    How to import albums into a Smart playlist?

    Change the criteria of the smart playlist to select the album.

  • How to import audiobooks into "Books" within itunes?

    How to import audiobooks into "Books" within itunes?
    Recently purchased mp3/mp4 audiobooks online. I can import into "music" but cannot get audiobook into "book" tab with other books purchased from Audible.

    See Audiobooks on iPods.
    tt2

  • Insert XML file into Relational database model - no XMLTYPE!

    Dear all,
    How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
    I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
    However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
    We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
    The database does and will not contain XMLTYPES, only plain RDBMS tables.
    Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
    Cheers.
    Luc.
    Edited by: user6693852 on Jan 13, 2009 7:02 AM

    In case you decide to follow my advice, here's a simple example showing how to do this.. (Note the XMLTable syntax is the preferred approach in 10gr2 and later..
    SQL> spool testase.log
    SQL> --
    SQL> connect / as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = XDBTEST
    SQL> --
    SQL> def PASSWORD = XDBTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user XDBTEST cascade
    User dropped.
    Elapsed: 00:00:00.59
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASS
    ORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &
    ASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDB
    EST
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> var SCHEMAURL varchar2(256)
    SQL> var XMLSCHEMA CLOB
    SQL> --
    SQL> set define off
    SQL> --
    SQL> begin
      2    :SCHEMAURL := 'http://xmlns.example.com/askTom/TransactionList.xsd';
      3    :XMLSCHEMA :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <!--W3C Schema generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
      7     <xs:element name="TransactionList" type="transactionListType" xdb:defaultTable="LOCAL_TABLE"/>
      8     <xs:complexType name="transactionListType"  xdb:maintainDOM="false" xdb:SQLType="TRANSACTION_LIST_T">
      9             <xs:sequence>
    10                     <xs:element name="Transaction" type="transactionType" maxOccurs="unbounded" xdb:SQLCollType="TRANSACTION_V"
    >
    11             </xs:sequence>
    12     </xs:complexType>
    13     <xs:complexType name="transactionType" xdb:maintainDOM="false"  xdb:SQLType="TRANSACTION_T">
    14             <xs:sequence>
    15                     <xs:element name="TradeVersion" type="xs:integer"/>
    16                     <xs:element name="TransactionId" type="xs:integer"/>
    17                     <xs:element name="Leg" type="legType" maxOccurs="unbounded" xdb:SQLCollType="LEG_V"/>
    18             </xs:sequence>
    19             <xs:attribute name="id" type="xs:integer" use="required"/>
    20     </xs:complexType>
    21     <xs:complexType name="paymentType"  xdb:maintainDOM="false" xdb:SQLType="PAYMENT_T">
    22             <xs:sequence>
    23                     <xs:element name="StartDate" type="xs:date"/>
    24                     <xs:element name="Value" type="xs:integer"/>
    25             </xs:sequence>
    26             <xs:attribute name="id" type="xs:integer" use="required"/>
    27     </xs:complexType>
    28     <xs:complexType name="legType"  xdb:maintainDOM="false"  xdb:SQLType="LEG_T">
    29             <xs:sequence>
    30                     <xs:element name="LegNumber" type="xs:integer"/>
    31                     <xs:element name="Basis" type="xs:integer"/>
    32                     <xs:element name="FixedRate" type="xs:integer"/>
    33                     <xs:element name="Payment" type="paymentType" maxOccurs="unbounded"  xdb:SQLCollType="PAYMENT_V"/>
    34             </xs:sequence>
    35             <xs:attribute name="id" type="xs:integer" use="required"/>
    36     </xs:complexType>
    37  </xs:schema>';
    38  end;
    39  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> set define on
    SQL> --
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(:XMLSCHEMA);
      4  begin
      5    dbms_xmlschema.registerSchema
      6    (
      7      schemaurl => :schemaURL,
      8      schemadoc => xmlSchema,
      9      local     => TRUE,
    10      genTypes  => TRUE,
    11      genBean   => FALSE,
    12      genTables => TRUE,
    13      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    14    );
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.26
    SQL> desc LOCAL_TABLE
    Name                                                                   Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.com/askTom/TransactionList.xsd" Element "TransactionList") STORAGE Object-rela
    ional TYPE "TRANSACTION_LIST_T"
    SQL> --
    SQL> create or replace VIEW TRAN_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TradeVersion/text()') tradeversion,
      5    extractvalue(x.column_value,'/Transaction//text()') transactionid
      6  from
      7    local_table,
      8    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x
      9  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
      5    extractvalue(y.column_value,'/Leg/Basis/text()') leg_basis,
      6    extractValue(y.column_value,'/Leg/FixedRate/text()') leg_fixedrate
      7  from
      8    local_table,
      9    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
    10    table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y
    11  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_PAY_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
      5    extractvalue(y.column_value,'/Leg/LegNumber/text()') leg_legnumber,
      6    extractvalue(z.column_value,'/Payment/StartDate/text()') pay_startdate,
      7    extractValue(z.column_value,'/Payment/Value/text()') pay_value
      8  from
      9    local_table,
    10    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
    11    table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y,
    12    table(xmlsequence(extract(y.column_value,'/Leg/Payment'))) z
    13  /
    View created.
    Elapsed: 00:00:00.03
    SQL> desc TRAN_VIEW
    Name                                                                   Null?    Type
    TRADEVERSION                                                                    NUMBER(38)
    TRANSACTIONID                                                                   VARCHAR2(4000)
    SQL> --
    SQL> desc TRAN_LEG_VIEW
    Name                                                                   Null?    Type
    TRANSACTIONID                                                                   NUMBER(38)
    LEG_BASIS                                                                       NUMBER(38)
    LEG_FIXEDRATE                                                                   NUMBER(38)
    SQL> --
    SQL> desc TRAN_LEG_PAY_VIEW
    Name                                                                   Null?    Type
    TRANSACTIONID                                                                   NUMBER(38)
    LEG_LEGNUMBER                                                                   NUMBER(38)
    PAY_STARTDATE                                                                   DATE
    PAY_VALUE                                                                       NUMBER(38)
    SQL> --
    SQL> create or replace VIEW TRAN_VIEW_XMLTABLE
      2  as
      3  select t.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRADE_VERSION  NUMBER(4) path 'TradeVersion/text()',
    11            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()'
    12         ) t
    13  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_VIEW_XMLTABLE
      2  as
      3  select t.TRANSACTION_ID, L.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
    11            LEG            XMLType   path 'Leg'
    12         ) t,
    13         XMLTABLE
    14         (
    15           '/Leg'
    16           passing LEG
    17           columns
    18           LEG_NUMBER     NUMBER(4) path 'LegNumber/text()',
    19           LEG_BASIS      NUMBER(4) path 'Basis/text()',
    20           LEG_FIXED_RATE NUMBER(4) path 'FixedRate/text()'
    21         ) l
    22  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_PAY_VIEW_XMLTABLE
      2  as
      3  select TRANSACTION_ID, L.LEG_NUMBER, P.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
    11            LEG            XMLType   path 'Leg'
    12         ) t,
    13         XMLTABLE
    14         (
    15           '/Leg'
    16           passing LEG
    17           columns
    18           LEG_NUMBER     NUMBER(4) path 'LegNumber/text()',
    19           PAYMENT        XMLType   path 'Payment'
    20         ) L,
    21         XMLTABLE
    22         (
    23           '/Payment'
    24           passing PAYMENT
    25           columns
    26           PAY_START_DATE     DATE      path 'StartDate/text()',
    27           PAY_VALUE          NUMBER(4) path 'Value/text()'
    28         ) p
    29  /
    View created.
    Elapsed: 00:00:00.03
    SQL> desc TRAN_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRADE_VERSION                                                                   NUMBER(4)
    TRANSACTION_ID                                                                  NUMBER(4)
    SQL> --
    SQL> desc TRAN_LEG_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRANSACTION_ID                                                                  NUMBER(4)
    LEG_NUMBER                                                                      NUMBER(4)
    LEG_BASIS                                                                       NUMBER(4)
    LEG_FIXED_RATE                                                                  NUMBER(4)
    SQL> --
    SQL> desc TRAN_LEG_PAY_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRANSACTION_ID                                                                  NUMBER(4)
    LEG_NUMBER                                                                      NUMBER(4)
    PAY_START_DATE                                                                  DATE
    PAY_VALUE                                                                       NUMBER(4)
    SQL> --
    SQL> set long 10000 pages 100 lines 128
    SQL> set timing on
    SQL> set autotrace on explain
    SQL> set heading on feedback on
    SQL> --
    SQL> VAR DOC1 CLOB
    SQL> VAR DOC2 CLOB
    SQL> --
    SQL> begin
      2    :DOC1 :=
      3  '<TransactionList>
      4    <Transaction id="1">
      5      <TradeVersion>1</TradeVersion>
      6      <TransactionId>1</TransactionId>
      7      <Leg id="1">
      8        <LegNumber>1</LegNumber>
      9        <Basis>1</Basis>
    10        <FixedRate>1</FixedRate>
    11        <Payment id="1">
    12          <StartDate>2000-01-01</StartDate>
    13          <Value>1</Value>
    14        </Payment>
    15        <Payment id="2">
    16          <StartDate>2000-01-02</StartDate>
    17          <Value>2</Value>
    18        </Payment>
    19      </Leg>
    20      <Leg id="2">
    21        <LegNumber>2</LegNumber>
    22        <Basis>2</Basis>
    23        <FixedRate>2</FixedRate>
    24        <Payment id="1">
    25          <StartDate>2000-02-01</StartDate>
    26          <Value>10</Value>
    27        </Payment>
    28        <Payment id="2">
    29          <StartDate>2000-02-02</StartDate>
    30          <Value>20</Value>
    31        </Payment>
    32      </Leg>
    33    </Transaction>
    34    <Transaction id="2">
    35      <TradeVersion>2</TradeVersion>
    36      <TransactionId>2</TransactionId>
    37      <Leg id="1">
    38        <LegNumber>21</LegNumber>
    39        <Basis>21</Basis>
    40        <FixedRate>21</FixedRate>
    41        <Payment id="1">
    42          <StartDate>2002-01-01</StartDate>
    43          <Value>21</Value>
    44        </Payment>
    45        <Payment id="2">
    46          <StartDate>2002-01-02</StartDate>
    47          <Value>22</Value>
    48        </Payment>
    49      </Leg>
    50      <Leg id="22">
    51        <LegNumber>22</LegNumber>
    52        <Basis>22</Basis>
    53        <FixedRate>22</FixedRate>
    54        <Payment id="21">
    55          <StartDate>2002-02-01</StartDate>
    56          <Value>210</Value>
    57        </Payment>
    58        <Payment id="22">
    59          <StartDate>2002-02-02</StartDate>
    60          <Value>220</Value>
    61        </Payment>
    62      </Leg>
    63    </Transaction>
    64  </TransactionList>';
    65    :DOC2 :=
    66  '<TransactionList>
    67    <Transaction id="31">
    68      <TradeVersion>31</TradeVersion>
    69      <TransactionId>31</TransactionId>
    70      <Leg id="31">
    71        <LegNumber>31</LegNumber>
    72        <Basis>31</Basis>
    73        <FixedRate>31</FixedRate>
    74        <Payment id="31">
    75          <StartDate>3000-01-01</StartDate>
    76          <Value>31</Value>
    77        </Payment>
    78      </Leg>
    79    </Transaction>
    80  </TransactionList>';
    81  end;
    82  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    SQL> insert into LOCAL_TABLE values ( xmltype(:DOC1))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1
    | Id  | Operation                | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT         |             |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | LOCAL_TABLE |       |       |            |          |
    SQL> insert into LOCAL_TABLE values ( xmltype(:DOC2))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1
    | Id  | Operation                | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT         |             |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | LOCAL_TABLE |       |       |            |          |
    SQL> select * from TRAN_VIEW_XMLTABLE
      2  /
    TRADE_VERSION TRANSACTION_ID
                1              1
                2              2
               31             31
    3 rows selected.
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 650975545
    | Id  | Operation          | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                                |     3 |   168 |     3   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS      |                                |     3 |   168 |     3   (0)| 00:00:01 |
    |*  2 |   TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   138 |     3   (0)| 00:00:01 |
    |*  3 |   INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       3 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
    Note
       - dynamic sampling used for this statement
    SQL> select * from TRAN_LEG_VIEW_XMLTABLE
      2  /
    TRANSACTION_ID LEG_NUMBER  LEG_BASIS LEG_FIXED_RATE
                 1          1          1              1
                 1          2          2              2
                 2         21         21             21
                 2         22         22             22
                31         31         31             31
    5 rows selected.
    Elapsed: 00:00:00.04
    Execution Plan
    Plan hash value: 1273661583
    | Id  | Operation           | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |                                |     5 |   560 |     7  (15)| 00:00:01 |
    |*  1 |  HASH JOIN          |                                |     5 |   560 |     7  (15)| 00:00:01 |
    |   2 |   NESTED LOOPS      |                                |     3 |   159 |     3   (0)| 00:00:01 |
    |*  3 |    TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   129 |     3   (0)| 00:00:01 |
    |*  4 |    INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    |*  5 |   TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== |     5 |   295 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
       3 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       4 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
       5 - filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL> select * from TRAN_LEG_PAY_VIEW_XMLTABLE
      2  /
    TRANSACTION_ID LEG_NUMBER PAY_START  PAY_VALUE
                 1          1 01-JAN-00          1
                 1          1 02-JAN-00          2
                 1          2 01-FEB-00         10
                 1          2 02-FEB-00         20
                 2         21 01-JAN-02         21
                 2         21 02-JAN-02         22
                 2         22 01-FEB-02        210
                 2         22 02-FEB-02        220
                31         31 01-JAN-00         31
    9 rows selected.
    Elapsed: 00:00:00.07
    Execution Plan
    Plan hash value: 4004907785
    | Id  | Operation            | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                                |     9 |  1242 |    10  (10)| 00:00:01 |
    |*  1 |  HASH JOIN           |                                |     9 |  1242 |    10  (10)| 00:00:01 |
    |*  2 |   HASH JOIN          |                                |     5 |   480 |     7  (15)| 00:00:01 |
    |   3 |    NESTED LOOPS      |                                |     3 |   159 |     3   (0)| 00:00:01 |
    |*  4 |     TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   129 |     3   (0)| 00:00:01 |
    |*  5 |     INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    |*  6 |    TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== |     5 |   215 |     3   (0)| 00:00:01 |
    |*  7 |   TABLE ACCESS FULL  | SYS_NTelW4ZRtKS+WKqCaXhsHnNQ== |     9 |   378 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0000900010$")
       2 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
       4 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       5 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
       6 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       7 - filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL>Out of interest why are you so against using XMLType...
    Edited by: mdrake on Jan 13, 2009 8:25 AM

Maybe you are looking for

  • Cannot print from hp DeskJet F4580

    I have just bought my first MacBook with Mac OS X 10.6.4. Great computer. However I cannot print from the wireless hp printer. I downloaded the latest driver from hp (maybe a fault) and started to install. Everything went as expected untill the setup

  • Solaris 10 with Qlogic card facing network issue

    Dear Community, I am facing network issue with one of M5000 server card vender is qlogic and switch is brocarde, if we reset the port from switch side, it will work for nearly 2 hours. after that ping will stop. here is the details. and there is no e

  • The filename you entered already exists...

    When I attempt to save over an existing page (in order to replace it), I get the following error message: The filename you entered already exists. Please enter a different filename. How can a save over a file without being roadblocked by this error?

  • Optical drive won't open

    How can I manually open the optical drive on my Mac Pro? There is no paperclip hole that I can see. Thanks in advance. (I searched for this and found nothing. It's hard to believe it hasn't been asked.)

  • Complaint qty and Ref Quantity field should be Blank in QM01

    Hi Gurus, When using QM01 the quantities shown in Complaint qty and Ref Quantity are from the Production Order.These fields should be shown as Zero in order to not to confuse the data entry personnel, by mistake they are leaving the fields with the s