How to achive in this data in oracle using xml tag ?

hi All ,
i am using sql 3.1
i have one question that how can i achieve this below XML tag using XML query. this below  whatever i am showing here data is one table . how can i achieve this things using XML tag like xml forest or whatever may be
please help me .
---code
<Metadata>
<Dept Deptno="10">
  <Name>Administration</Name>
  <Location>Seattle</Location>
  <Employees>
   <Emp empid="200">
    <FirstName>Jennifer</FirstName>
    <LastName>Whalen</LastName>
   </Emp>
  </Employees>
</Dept>
<Dept Deptno="20">
  <Name>Marketing</Name>
  <Location>Toronto</Location>
  <Employees>
   <Emp empid="201">
    <FirstName>Michael</FirstName>
    <LastName>Hartstein</LastName>
   </Emp>
   <Emp empid="202">
    <FirstName>Pat</FirstName>
    <LastName>Fay</LastName>
   </Emp>
  </Employees>
</Dept>
</metadata>
Thanks
Damby

please reply

Similar Messages

  • I want to load data into Oracle using XML & Java - hints??

    I have a XML files that are created on a timed basis....they describe a photo and point to a dir where the photo is stored...like...
    <image>
    <user>bill</user>
    <img>photo.jpg</img>
    <img_dir>'/tmp/photos'</img_dir>
    </image>
    I'd like to write a Java program that parses the XML and loads the images, data into Oracle.
    Suggestions on Oracle tools, downloads that will help me accomplish this???
    Thanks!

    Depending on whether you want assistance in doing the insert into the database or whether you don't mind writing the JDBC code to perform the insert, you can get by with only our XML Parser for Java v2, which implements SAX, DOM, XPath, and XSLT standards. The latest beta release (2.1.0) supports SAX2 and DOM2.
    If you want help inserting the XML into tables, then in addition to this, you might want our XML SQL Utility as well.
    http://technet.oracle.com/tech/xml
    Steve Muench
    Lead Product Manager for BC4J and Lead XML Evangelist
    Author, Building Oracle XML Applications
    null

  • How to import csv data into Oracle using c#

    Hello,
    How to import csv data into Oracle using c #. Where data to be imported 3GB in size and number of rows 7512263. I've managed to import csv data into Oracle, but the time it takes about 1 hour. How to speed up the time it takes to import csv data into oracle. Thank you.
    This is my code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.Threading;
    using System.Text.RegularExpressions;
    using System.IO;
    using FileHelpers;
    using System.Data.OracleClient;
    namespace sqlloader
    class Program
    static void Main(string[] args)
    int jum;
    int i;
    bool isFirstLine = false;
    FileHelperEngine engine = new FileHelperEngine(typeof(XL_XDR));
    //Connect To Database
    string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST="
    + "(ADDRESS=(PROTOCOL=TCP)(HOST= pt-9a84825594af )(PORT=1521 )))"
    + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=o11g)));"
    + "User Id=xl;Password=rahasia;";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
    // To Read Use:
    XL_XDR[] res = engine.ReadFile("DataOut.csv") as XL_XDR[];
    jum = CountLinesInFile("DataOut.csv");
    FileInfo f2 = new FileInfo("DataOut.csv");
    long s2 = f2.Length;
    int jmlRecord = jum - 1;
    for (i = 0; i < jum; i++)
    ShowPercentProgress("Processing...", i, jum);
    Thread.Sleep(100);
    if (isFirstLine == false)
    isFirstLine = true;
    else
    string sql = "INSERT INTO XL_XDR (XDR_ID, XDR_TYPE, SESSION_START_TIME, SESSION_END_TIME, SESSION_LAST_UPDATE_TIME, " +
    "SESSION_FLAG, VERSION, CONNECTION_ROW_COUNT, ERROR_CODE, METHOD, HOST_LEN, HOST, URL_LEN, URL, CONNECTION_START_TIME, " +
    "CONNECTION_LAST_UPDATE_TIME, CONNECTION_FLAG, CONNECTION_ID, TOTAL_EVENT_COUNT, TUNNEL_PAIR_ID, RESPONSIVENESS_TYPE, " +
    "CLIENT_PORT, PAYLOAD_TYPE, VIRTUAL_TYPE, VID_CLIENT, VID_SERVER, CLIENT_ADDR, SERVER_ADDR, CLIENT_TUNNEL_ADDR, " +
    "SERVER_TUNNEL_ADDR, ERROR_CODE_2, IPID, C2S_PKTS, C2S_OCTETS, S2C_PKTS, S2C_OCTETS, NUM_SUCC_TRANS, CONNECT_TIME, " +
    "TOTAL_RESP, TIMEOUTS, RETRIES, RAI, TCP_SYNS, TCP_SYN_ACKS, TCP_SYN_RESETS, TCP_SYN_FINS, EVENT_TYPE, FLAGS, TIME_STAMP, " +
    "EVENT_ID, EVENT_CODE) VALUES (" +
    "'" + res.XDR_ID + "', '" + res[i].XDR_TYPE + "', '" + res[i].SESSION_START_TIME + "', '" + res[i].SESSION_END_TIME + "', " +
    "'" + res[i].SESSION_LAST_UPDATE_TIME + "', '" + res[i].SESSION_FLAG + "', '" + res[i].VERSION + "', '" + res[i].CONNECTION_ROW_COUNT + "', " +
    "'" + res[i].ERROR_CODE + "', '" + res[i].METHOD + "', '" + res[i].HOST_LEN + "', '" + res[i].HOST + "', " +
    "'" + res[i].URL_LEN + "', '" + res[i].URL + "', '" + res[i].CONNECTION_START_TIME + "', '" + res[i].CONNECTION_LAST_UPDATE_TIME + "', " +
    "'" + res[i].CONNECTION_FLAG + "', '" + res[i].CONNECTION_ID + "', '" + res[i].TOTAL_EVENT_COUNT + "', '" + res[i].TUNNEL_PAIR_ID + "', " +
    "'" + res[i].RESPONSIVENESS_TYPE + "', '" + res[i].CLIENT_PORT + "', '" + res[i].PAYLOAD_TYPE + "', '" + res[i].VIRTUAL_TYPE + "', " +
    "'" + res[i].VID_CLIENT + "', '" + res[i].VID_SERVER + "', '" + res[i].CLIENT_ADDR + "', '" + res[i].SERVER_ADDR + "', " +
    "'" + res[i].CLIENT_TUNNEL_ADDR + "', '" + res[i].SERVER_TUNNEL_ADDR + "', '" + res[i].ERROR_CODE_2 + "', '" + res[i].IPID + "', " +
    "'" + res[i].C2S_PKTS + "', '" + res[i].C2S_OCTETS + "', '" + res[i].S2C_PKTS + "', '" + res[i].S2C_OCTETS + "', " +
    "'" + res[i].NUM_SUCC_TRANS + "', '" + res[i].CONNECT_TIME + "', '" + res[i].TOTAL_RESP + "', '" + res[i].TIMEOUTS + "', " +
    "'" + res[i].RETRIES + "', '" + res[i].RAI + "', '" + res[i].TCP_SYNS + "', '" + res[i].TCP_SYN_ACKS + "', " +
    "'" + res[i].TCP_SYN_RESETS + "', '" + res[i].TCP_SYN_FINS + "', '" + res[i].EVENT_TYPE + "', '" + res[i].FLAGS + "', " +
    "'" + res[i].TIME_STAMP + "', '" + res[i].EVENT_ID + "', '" + res[i].EVENT_CODE + "')";
    OracleCommand command = new OracleCommand(sql, con);
    command.ExecuteNonQuery();
    Console.WriteLine("Successfully Inserted");
    Console.WriteLine();
    Console.WriteLine("Number of Row Data: " + jmlRecord.ToString());
    Console.WriteLine();
    Console.WriteLine("The size of {0} is {1} bytes.", f2.Name, f2.Length);
    con.Close();
    static void ShowPercentProgress(string message, int currElementIndex, int totalElementCount)
    if (currElementIndex < 0 || currElementIndex >= totalElementCount)
    throw new InvalidOperationException("currElement out of range");
    int percent = (100 * (currElementIndex + 1)) / totalElementCount;
    Console.Write("\r{0}{1}% complete", message, percent);
    if (currElementIndex == totalElementCount - 1)
    Console.WriteLine(Environment.NewLine);
    static int CountLinesInFile(string f)
    int count = 0;
    using (StreamReader r = new StreamReader(f))
    string line;
    while ((line = r.ReadLine()) != null)
    count++;
    return count;
    [DelimitedRecord(",")]
    public class XL_XDR
    public string XDR_ID;
    public string XDR_TYPE;
    public string SESSION_START_TIME;
    public string SESSION_END_TIME;
    public string SESSION_LAST_UPDATE_TIME;
    public string SESSION_FLAG;
    public string VERSION;
    public string CONNECTION_ROW_COUNT;
    public string ERROR_CODE;
    public string METHOD;
    public string HOST_LEN;
    public string HOST;
    public string URL_LEN;
    public string URL;
    public string CONNECTION_START_TIME;
    public string CONNECTION_LAST_UPDATE_TIME;
    public string CONNECTION_FLAG;
    public string CONNECTION_ID;
    public string TOTAL_EVENT_COUNT;
    public string TUNNEL_PAIR_ID;
    public string RESPONSIVENESS_TYPE;
    public string CLIENT_PORT;
    public string PAYLOAD_TYPE;
    public string VIRTUAL_TYPE;
    public string VID_CLIENT;
    public string VID_SERVER;
    public string CLIENT_ADDR;
    public string SERVER_ADDR;
    public string CLIENT_TUNNEL_ADDR;
    public string SERVER_TUNNEL_ADDR;
    public string ERROR_CODE_2;
    public string IPID;
    public string C2S_PKTS;
    public string C2S_OCTETS;
    public string S2C_PKTS;
    public string S2C_OCTETS;
    public string NUM_SUCC_TRANS;
    public string CONNECT_TIME;
    public string TOTAL_RESP;
    public string TIMEOUTS;
    public string RETRIES;
    public string RAI;
    public string TCP_SYNS;
    public string TCP_SYN_ACKS;
    public string TCP_SYN_RESETS;
    public string TCP_SYN_FINS;
    public string EVENT_TYPE;
    public string FLAGS;
    public string TIME_STAMP;
    public string EVENT_ID;
    public string EVENT_CODE;
    I hope someone can give me a solution. Thanks

    The fastest way is to use external tables or sql loader (sqlldr). (If you use external tables or sql loader, you don't use C# at all).

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • I connect my pendrive to macbook pro but it cannot detect and my important data is there in my pen drive so how can i collect this data from my pendrive?

    i connect my externalpendrive to macbook pro but it cannot detect and my important data is there in my pen drive so how can i collect this data from my pendrive?

    make sure that in your finder preferences you have it checked to show external drives on the desktop and in the sidebar of finder
    you find these preferences by selecting the finder icon (blue square on the dock w/ smiley face on it) then click on the work "finder" at top left corner of computer screen then click on preferences then general and put check next to show these items on the desktop and put check next to external drives
    now you should see it on the desktop if you still can't open the drive or access it, it may be in format the mac can't read or write to so that could be an issue.

  • I updated the IPAD with the latest update and now when I turned the IPAD on, I get the itunes logo and then nothing else.  How can I fix this to let me use my IPAD?

    I updated the IPAD with the latest update and now when I turned the IPAD on, I get the itunes logo and then nothing else.  How can I fix this to let me use my IPAD?

    YOU ARE IN RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • My MacBook Pro hard drive is almost full and I wish to store my Aperture Library on an external drive, how do I do this and is the use of USB2 suitable or do I need to use a Firewire external hard drive?

    My MacBook Pro hard drive is almost full and I wish to store my Aperture Library on an external drive, how do I do this and is the use of USB2 suitable or do I need to use a Firewire external hard drive?

    You'll get better performance if you use a Firewire hard drive (especially if you buy a 7200 RPM drive). Firewire's IO speed is significantly faster than USB 2.  USB 2 has a theoretical max speed of 480 Mbps except that it has extremely high over-head.   The fastest speeds you can typically get are about 300 Mbps.   Firewire, on the other hand, has very little overhead.  The fastest speeds you can get are very nearly 800 Mbps.  You will typically be constrained by the maximum read/write speed of the drive, not the speed of the I/O on the Firewire bus.  Now if you had one of those nice shiny new Macs with the Thunderbolt I/O and a Thunderbolt drive (Light Peak) ... I think they alter space and time so that your data arrives before you know you want it. 
    Also... unless you want to buy a solid state drive (very expensive), try to keep your hard drives from becoming much more than about 60% full if you want great performance.  A nearly "full" hard drive is, on average, only about half as fast as the same hard drive when nearly empty.
    USB 2 will work perfectly fine... just not as fast.
    Also... it's much safer to move the entire Aperture library than to "relocate masters".  Your images must be managed.  You can Aperture manage them, or you can manage them.  But someone has to manage them.  If you "relocate" them so that they are no longer stored inside the Aperture library then you'll need to work out a system of how you decide to organize things and it's critically important that you don't start moving files around or deleting things without Aperture's knowledge.  If you do, you'll break the links to your masters and start having problems with missing masters.  If you have Aperture manage the library then you don't need to worry about any of that stuff.... it's safer.
    Do make backups (use the Aperture Vault or use some other backup program, but make sure you back up your work if you care about it.)  There are only two kinds of hard drives in the world:  (1) those that have failed and (2) those that are going to fail.  There are no exceptions to this rule.  Hard drives are cheap.  Backup software is built into Aperture and into your Mac.

  • How can i write the data to PIC16F819 using labview?

    how can i write the data to PIC16F819 using labview?
    Need help!
    im using labview in gathering the datas that i need to right to the PIC, then after getting all the datas i am using another program which is ICD2 in order to write it to the PIC. Is it possible to do this task through LV? coz we are spending a lot of time transferring the data from LV to ICD2 manually and its prone to mistake as well.
    any suggestion?
    thanks,
    Pedz

    LabVIEW does not currently have a built-in method to communicate with
    i2c, but there are other vendors that sell devices to communicate in
    this manner with LabVIEW development kits.  One that I know of is
    from MCC... here is a link:  http://www.mcc-us.com
    They sell a device called iPort, and then you can buy LabVIEW VIs to go with it.  I hope this is helpful to you!
    john m

  • Sharing iPad2:  how to protect my own data when others use it?

    A single iPad2 is shared with others.  How do we protect individual data when others use the iPad?

    I use iCab and Comcast email with no problems. Try restarting your iPad. Try quitting iCab, restart the iPad and then try again. Just keep fighting the loop and see if you can ultimately get it to work if you have to.
    Try using the Connect Lite version of the Xfinity/Comast mail on the iPad. You will have to change that in the preferences on the server. It is in the general section. You want to select Xfinity Connect Lite. I have Comcst and I think this makes it a little easier to navigate and its a little more iPad friendly.
    If you want to be able to write mail in the Comcast webmail on the iPad you have to change to use Plain Text instead of HTML in the Composing preference. If you don't, the keyboard will not popup when you tap in the text field. You will be able to enter the email address in the To: field and the subject in the subject line but that is all unless you switch to plain text.
    I actually prefer the mail app on the iPad to using the Comcast webmail but that's just my preference.

  • After enabling cellular data, i am receiving mails even if disable "use cellular data for mail", due to this data usage usage use is more, if we have fix please let me know

    Phone Model and OS
    Model - iphone 5
    IOS 8.0.2
    Problem Description
    After enabling cellular data, i am receiving mails even if we disable "use cellular data for mail", due to this data usage usage use is more, if we have fix please let me know.
    Steps:
    1. Enable Cellular Data
    2. Disable mail on "use cellular data for mail
    3. check whether mail is received or not
    tried multiple times and i am getting more billing amount because of data usage

    Mail isn't the only app using data. Turning it off there has no effect whatsoever on whether the rest of iOS or other apps you have installed. In fact most apps use data these days, at a minimum for Notifications and often for gameplay and other features.

  • HT5132 I can't click on the 'Learn More' or 'Ok' options so cannot use Aperture. How do I overcome this problem? I use OS X Lion 10.7.4

    I can't click on the 'Learn More' or 'Ok' options so cannot use Aperture. How do I overcome this problem?
    I use OS X Lion 10.7.4.
    I also don't seem to be able to disable the Mobileme account via the system preferences option as mobileme doesn't allow access with my password.

    Have you tried to disconnect from the Internet before launching Aperture? Then the MobileMe webpage should not be shown and you should be able to access the Aperture preferences and remove the MobileMe account from the "Preferences > Web" panel.
    If this does not succeed, (Force) quit Aperture, log off and log on again, then remove the Aperture Preferences file (~/Library/Preferences/com.apple.Aperture.plist)
    from the Preferences Folder in your User Library and try again to launch Aperture. See http://support.apple.com/kb/HT3805 on how to remove the Preferences.
    Regards
    Léonie

  • I have a Mobile banking app that keeps telling me that I have timed out do to inactivity. How can I fix this so I can use the app again?

    I have a Mobile banking app that keeps telling me that I have timed out do to inactivity. How can I fix this so I can use the app again?

    - double tap your home button
    - swipe to the banking app you have then slide that app up to close it
    - select the home screen window
    Now try and open up your banking app.

  • When starting Final Cut Pro 7.0.3 I am all of a sudden getting a message that says "One or more of the scratch disks don't have read/ write access" and now the app won't operate - how do I fix this so I can use Final Cut Pro?

    When starting Final Cut Pro 7.0.3 I am all of a sudden getting a message that says "One or more of the scratch disks don't have read/ write access" and now the app won't operate - how do I fix this so I can use Final Cut Pro?

    Glad you found the answer.  But something seems wrong.  FCP should be able to assign the scratch disk to your startup drive.  It's not advisable, but it should be possible.  You might want to try and figure out what's going on before what ever's going on cause other problems.

  • How do i remove this feature? where using google maps the input box has this in it( Enter your address line 2 here)/In hotmailmail new email it reads (Enter your email here) e

    how do i remove this feature? where using google maps the input box has this in it( Enter your address line 2 here)/In hotmail new email on the enter page it reads (Enter your email here) .
    You have the remove these statements before entering an address , and before sending an email or with the email it will stay on the email , google maps will not work.

    Try this -
    <img src="assets/jpgs/Prodigy Logo Large 2014.jpg" width="180" height="180" alt="" style="display:block;">
    What you are seeing as whitespace is the space reserved for glyph descenders on any element that is rendered within a text box (i.e., an inline element). By making the image "display:block" you eliminate that space because a block element doesn't have descenders. If that works to your satisfaction then you can give the logo an id, and create a CSS selector containing that block style.

  • HT1430 my daughter has forgotten her password on her ipod how do we fix this so she can use her ipod again

    my daughter has forgotten her password on her ipod touch how do we fix this so she can use her ipod again

    Just re-dock the ipod in the computer it is normally synced with and choose to restore ipod. Read more detail here - http://support.apple.com/kb/HT1339

Maybe you are looking for

  • Can't Drag Files into the Itunes Library anymore

    I was just taking some mp3s from my old computer to my new one and I have been doing this for a few days, yesterday, I couldn't drag anymore songs into the library for some reason. A blue rectangle comes up, but I can't position it over 'Music'. Drag

  • I am getting redirects on iPad air and iPad 2 whether using wifi or Cell services.

    iPad Air running 8.2 Model mfoo3ll/a I did a search today for a local doctors website and phone number using google. When I clicked on the site I was first directed to a "app" to buy ****. I closed the window and opened a new window and typed in the

  • Is there any iPhone midi controller that can control logic just by USB?

    is there any iPhone midi controller that can control logic just by one usb insert to the mac? Free ones would be the best! Thanks!

  • Exporting for every windows user.

    I'm having trouble exporting mov files so they can be played in Windows. My family all say they can't play my exports (which are all .mov, AAC, 32kHz, H.264, 160x120, 10fps) although I can play them on my windows machines just fine - including a 'bar

  • Messages vanish from Inbox when I click on them

    This has happened a few times. I can't figure out why. This seems to apply to messages that are only a few seconds old. Either it disappears a moment after I've clicked on it, or it simply vanishes moments after appearing in my Inbox. It's not in Jun