How to store data from xml in oracle database

Hello All
Could anyone tell me ways of storing XML in Oracle and whats the best one in terms of performance issues.
any URL to this q/s would be great.
thanks
kedar

Ben,
The following link as some information regarding DOM API and XSQL.
http://asktom.oracle.com/pls/ask/f?p=4950:8:2923508047773696280::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:17309127931717
For XML DB, you may want to create an XMLSchema and build a table off the schema definition. Then use WEBDAV to load the xml into a folder (ie object table) Once the xml is in the database you could build a view for a relational look at the data.
Example from XMLDB Techical White Paper doc.
create or replace view PURCHASEORDER_MASTER_VIEW
(reference, requestor, userid, costcenter,...)
as select extractValue(Value(p),'/PurchaseOrder/Reference'),
extractValue(value(p),'/PurchaseOrder/Requestor'),
extractValue(value(p),'/PurchaseOrder/User'),
extractValue(value(p),'/PurchaseOrder/CostCenter'),...
from PURCHASEORDER p

Similar Messages

  • Import/insert data from XML into Oracle database tables?

    Hi. (I am using JDeveloper 10.1.3.3.0 and Oracle 10g)
    I have been able to export the data from one of my database tables by using a View Object and .writeXML.
    Now, I want to take an xml file that is formatted in the same way as what is spit out by the writeXML and put that info in my database table. I followed online examples and have tried using .readXML like so:
    Element element = XMLDoc.getDocumentElement();
    vo.readXML(element, -1);
    I know it is sort of working, because at first I got an error message that one of the required attributes was missing. So, I added that attribute to my xml file and ran my code. No errors. But, I checked my database, and the new records were not added.
    Is there something I have done wrong? Or is there perhaps something I left out? I also noticed there were several versions of readXML like readFromXML. Which one should I use and how?
    Thanks.

    KUBA, I changed my code to match your example:
    DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    File xmlFile = new File("C:/myfilehere.xml");
    Document doc = db.parse(xmlFile);
    Element element = doc.getDocumentElement();
    vo.readXML(element, -1);
    vo.getDBTransaction().commit();
    I still get no errors, but my database table has no new records.
    Any ideas why?
    Thanks.

  • How to extract data from essbase to oracle database incrementally?

    I have to extract data from essbase to an oracle database table incrementally using informatica , can anyone tell me how to do it or give me some tips. I have been thinking about it for a whole day but have no ideas.
    I cannot do the delete & insert method because this oracle database table is a interface table that has to deliver the data to Oracle ESB tables.
    Thanks in advance....

    Hi,
    Have you read through :-
    Oracle Data Integrator Adapter for Hyperion Essbase Getting Started - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_getting_started.pdf
    Oracle Data Integrator Adapter for Hyperion Essbase User's Guide - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_users.pdf
    If you have read them and are still have a problem at what stage are you having the issues?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to extract data from XML file with JavaScript

    HI All
    I am new to this group.
    Can anybody help me regarding XML.
    I want to know How to extract data from XML file with JavaScript.
    And also how to use API for XML
    regards
    Nagaraju

    This is a Java forum.
    JavaScript is something entirely different than Java, even though the names are similar.
    Try another website with forums about JavaScript.
    For example here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3

  • How can i convert data from DBF to oracle database 10g?

    Sir,
    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    http://www.princeton.edu/~storacle/sqlloader_demo.shtml
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

  • How to store data from textfile to vector and delete a selected row.

    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)

    nemesisjava wrote:
    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)What's the problem? What have you done so far? What failed?
    What you described should be pretty easy to do.

  • How to delete data before insert in oracle database

    Hi friends,
    I have one scenario.I want to send data from sap to Oracle database.Befor i am inserting data in database table,i want to clean/delete all the records in the table .This interface will run twice in a day.Can any body help me.
    SAP-PI-JDBC
    Thanks
    Ravi

    Hi Puneet,
    As per u r suggestions,i am using stored procedure.But i am getting following error.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. MASTERXXXXXX' (structure 'Statement'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'NAME' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)'
    I have define below structure.Please check the structure and guide me.
    <Statement
            Action   attribute  required
            Table 
    Access  
            Empname   string
            Empid         string
            date            date
              Type     attribute   required
    EXECUTE----
    >Action
    Table----
    >MASTERXXXXXX
    Type----
    >char
    Please check the above structure andguide me to changes if any requires.
    Thanks
    Ravi

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • How to fetch data from XML and store it in internal table

    Hi All,
    Can anyone help me out, in fetching data from xml and store it in an internal table. Is there any standard function module is there?
    Regards,
    Karthick

    to do this you can either develop a XSLT program and use it with CALL TRNSFORMATION key word to tranform the XML into itab .
    (search the ABAP General forum, i have posted few samples)
    or simply use the following FM which converts your XML into a itab of name value pair (name would holw the element name and value would hold the value of the element) which you can then loop and read it to your itb.
    data:             xmldata type xstring .
    data: result_xml type standard table of smum_xmltb .
    data: return type standard table of bapiret2 .
    CALL FUNCTION 'SMUM_XML_PARSE'
      EXPORTING
        xml_input       = xmldata
      TABLES
        xml_table       = result_xml
        return          = return .
    Regards
    Raja

  • Data from xml to oracle tables

    Hi All,
    I need to store data from the XML documents into appropriate tables in ORACLE. Note: I dont need to store the document itself, but the data in the document needs to be stored in the tables. What is the right way of doing this?
    I previoulsy used SQLXML3.0 to load data from the XML documents to SQL server database ( .xsd will take care of the mapping), but we now need to store data into Oracle tables.
    Thanks,

    There is a XMLDB demo authored by Mark Drake. This will explain a lot about Oracle XMLDB.
    AFter reading, if you still have questions post back to the list
    http://www.oracle.com/ultrasearch/wwws_otn/searchotn.jsp?p_Action=Search&p_Query=demo+xml

  • How to store data from Host.vi in cRIO-9074

    TejasKumar Patel
    I implemented a advance Measurement and Control system using cRIO-9074
    with c-Series I/O cards( NI 9217, 9411, 9264)
    I have some questions about it,
    (1)- Data rate from FPGA targate to host vi is too low. how can I increase
    it, when I run my host VI, sometimes all temperature sensor update at
    same time and sometimes one by one, can you please give me some hint, how
    can I correct it, I used two FIFOs for NI-9411 digital pulses, I put all
    Digital input and all analog output and input in a seperate while loop in
    FPGA targate VI.
    (2)- I have to write that data to analyse for further result. I tried all
    possible way to write data including wite to spreadsheet.vi, write to
    text.vi, Data storage.vi, Write to measurement.vi. All this VI work
    efficientlywhen it run individualy, But when I connect this VI to
    writedata from FPGA host VI. than it always give empty file.
    I saw your post in NI discussion forum about how to write data from
    Host.vi, But still I am confuse that how can I creat a protocol between
    host VI and Fpga target vi. to write the data in a file. I have nearabout
    38 channel to write data.
    (3)- I have to measure time difference between two digital pulses, to find
    a flow rate. I am using counter for it with risisng edge shot.vi, but when
    i get a timestemp when there is risisng edge for the second rising edge
    how can I get timestemp. Its like i have to measure time between two
    pulses, I triend waveform measurement.vi to find cycle period. but it not
    worked. any other was to measure it.
    I am stuck in this question since from last one month. I already followed
    NI-discussion forum solution but it doesnt work. I think the way I applied
    is may be wrong. 
    Looking forward to hear from you soon.
    Plese send an additional email copy to [email protected]
    Thank you and Best Regards, 

    Thanks Joseph for your support,
    1-      If I count the ticks between the pulses it always seems different ….because this method I already tried, but it does not work,  like some times it shows 9099 tick and at the second pulse it shows like some more or less ticks not the same ticks every time. To complete my project, the biggest problem is the data storage.
    2-      As you gives the solution in NI forum, “low level file I/O Vis such as Write to text file” FPGA target not support this VI. And mainly I want to write data from HOST.vi, because I am process those data …and I need to store it. For to figure out my result.
    3-      If I use “Write to text file. VI (Sub-VI ) to FPGA.vi, it not support because it support string data and I have FIXpoint data. And can you explain me what is low level file IO, and how can I use in fpga.vi??
    4-      Yes, for my project time stamp it really necessary, for data analysis.
    5-      I need the time stamp to find out what was the system response at the time.  As our project based on weather temperature, I need time stamp.
    Waiting for your reply,
    Thanks and Regards,
    Patel

  • How to select data from Sql server 2005 database tableinto oracle database table

    Hi,
    I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
    Thanks a lot in advance.
    rk
    OS: Windows 7 professional

    Hi,
    you can use export/import wizard and specify sql server as a source and oracle as destination.
    I hope this is helpful.
    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    MCSE Data Platform
    MCITP: SQL Server 2008 Administration/Development
    MCSA SQL Server 2012
    MCTS: SQL Server Administration/Development
    MyBlog

  • How to retrive data from .XML file to JMS

    hi friends.. this is vamsi from india.. i have been working on jsp, java bean, xml, jms, message driven bean , ejb and database from last couple of days. but i am not able to retrieve data from fields in xml file to jms. can any one help me out in retrieving the data from xml to jms..
    thanking you,
    vamsi.

    Database but we are not able to retrieve the values
    from XML to JMS."We are not able to" is too vague a statement. An answer to this could well be "Did you turn your computer on?"
    So again, please post formatted code showing what you have done and where you are stuck.
    Perhaps an error message and/or a stack trace if appropriate.

  • Copy data from mysql to oracle database help?

    Im an sql newb and trying to understand how I can automatically copy data from one dtabase to another systems database on the same server.
    We have two differnt applications, but both share customer information, but one is on a win server, while the other is on oracle.
    Each time a customer contacts us via online chat (win server, mysql), we want to copy their entire chat transcript into our CRM's (oracle) customer account. So the folks that use the CRM can see the past chat histories. I hope this makes sense.
    Where can i look to get started on this?
    Thanks

    You could look at Heterogeneous Services (see the forum here Heterogeneous Connectivity but if you want to push data from mysql to oracle you might be better looking at it from the mssql side. I don't know what they offer.
    It might be simpler to do it at the client end. ie cut and paste from the online chat application into a new utility which inserts into the oracle database.
    Incidentally, this forum is specifically for the SQLDeveloper tool. You might get more general help in the "database - general" or "sql and pl/sql" forums

  • How to load data from UTL file to database

    Hi All,
    I am new in this technologies.
    I am facing below problem to load data from utl file to database .
    below is the script written by me :
    CREATE OR REPLACE PROCEDURE load_data AS
    v_line VARCHAR2(2000);
    v_file UTL_FILE.FILE_TYPE;
    v_dir VARCHAR2(250);
    v_filename VARCHAR2(50);
    v_1st_Comma NUMBER;
    v_2nd_Comma NUMBER;
    v_deptno NUMBER;
    v_dname VARCHAR2(14);
    v_loc VARCHAR2(13);
    BEGIN
    v_dir := ':f/rashi/dataload';
    v_filename := 'fake.txt';
    v_file := UTL_FILE.FOPEN(v_dir, v_filename, 'r');
    LOOP
    BEGIN
    UTL_FILE.GET_LINE(v_file, v_line);
    EXCEPTION
    WHEN no_data_found THEN
    exit;
    END;
    v_1st_Comma := INSTR(v_line, ',' ,1 , 1);
    v_2nd_Comma := INSTR(v_line, ',' ,1 , 2);
    v_deptno := SUBSTR(v_line, 1, v_1st_Comma-1);
    v_dname := SUBSTR(v_line, v_1st_Comma+1, v_2nd_Comma-v_1st_Comma-1);
    v_loc := SUBSTR(v_line, v_2nd_Comma+1);
    DBMS_OUTPUT.PUT_LINE(v_deptno || ' - ' || v_dname || ' - ' || v_loc);
    INSERT INTO don
    VALUES (v_deptno, UPPER(v_dname), UPPER(v_loc));
    END LOOP;
    UTL_FILE.FCLOSE(v_file);
    COMMIT;
    END;
    show error
    I am getting the below errors:
    LINE/COL ERROR
    3/8 PL/SQL: Item ignored
    3/8 PLS-00201: identifier 'UTL_FILE' must be declared
    15/1 PL/SQL: Statement ignored
    15/1 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    20/1 PL/SQL: Statement ignored
    20/19 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    36/1 PL/SQL: Statement ignored
    LINE/COL ERROR
    36/17 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    could anyone please advice me on above error.
    thanx.

    First of all, is file located on (or is accessible from) database server? If not - you can't load it neither with UTL_FILE nor with external table. You need to use client side tool like SQL*Loader or write your own client side load. If file is accessible from database server, then, as sb92075 noted, external table (assuming you are not on some ancient Oracle version) is the way to go.
    SY.

Maybe you are looking for

  • IPod nano will not charge when plugged into a computer, or power adapter

    This is an 8gb iPod nano 4th gen. Today, I was playing it on the stereo, and it ran out of juice, so i plugged it into my computer to charge. It would flash the "Connect to Power" screen, then turn off, then turn on, showing the apple logo, a few sec

  • Mount ocfs2 error in oracle 10g installation on vmware

    Dear All this is very urgent.....kindly help me... i m running this command for mount ocfs folder but not run gives error below....... [root@rac1 ~]#mount -t ocfs2 -o datavolume,nointr /dev/sda1 /ocfs ocfs2_hb_ctl: Bad magic number in superblock whil

  • QM Rejected  GR blocked Stock

    Dear All, Material transferred to GR blocked stock against purchase order thereby for clearance from QM. QM rejected Lot & Lot remain in GR Blocked Stock. Now how it can be moved to unrestricted stock as it shows meassage " Good Receipt Blocke for Pu

  • Glossary "add term" NOT working. Please advise.

    I am using the cookbook template to create a book. I ran into a problem, while using it. The scrollable list of ingrediants that exists by default I changed to my own ingrediants and when I attempted to add terms from there to the glossary, it won't

  • Adobe flash player installer screen blank.

    Every time I try to install the latest Flash player the "Adobe Flash Player Installer" screen goes blank. I'm on mac by the way (Yosemite) "Getting installation" and the bar shows up for a split second and then dissapears. The rest of the screen is c