eCharcha.Com   Support eCharcha.Com. Click on sponsor ad to shop online!

Advertise Here

Go Back   eCharcha.Com > Science and Technology > Computing

Notices

Computing All things binary...

Reply
 
Thread Tools Display Modes
  #1  
Old February 8th, 2007, 01:55 PM
motowner's Avatar
motowner motowner is offline
Senior eCharchan
 
Join Date: May 2006
Posts: 1,647
motowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond repute
Oracle External Table to Load XML File

Has anybody every used Oracle External Tables concept to parse and load an XML File? Or even used SQL Loader to do the same? Please provide an example if you have.
Reply With Quote
  #2  
Old February 9th, 2007, 03:17 AM
prosedevi prosedevi is offline
Junior eCharchan
 
Join Date: Oct 2001
Posts: 167
prosedevi is on a distinguished road
Re: Oracle External Table to Load XML File

Try like this -

LOAD DATA
INFILE *
INTO TABLE <<table_name>>
APPEND
XMLTYPE (xmldata)
FIELDS
(xmldata CHAR(2000))
BEGINDATA

<?xml version="1.0"?>*
<purchaseOrder xmlns="http://www.oracle.com/PO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/PO http://www.oracle.com/scha0/po1.xsd"
orderDate="1999-10-20">

<shipTo country="US">
<name>Alice Smith</name>
<street>123 Maple Street</street>
<city>Mill Valley</city>
<state>CA</state>
<zip>90952</zip>
</shipTo>

<billTo country="US">
<name>Robert Smith</name>
<street>8 Oak Avenue</street>
<city>Old Town</city>
<state>PA</state>
<zip>95819</zip>
</billTo>

<comment>Hurry, my lawn is going wild!</comment>

<items>
<item partNum="872-AA">
<productName>Lawnmower</productName>
<quantity>1</quantity>
<USPrice>148.95</USPrice>
<comment>Confirm this is electric</comment>
</item>*
<item partNum="926-AA">
<productName>Baby Monitor</productName>
<quantity>1</quantity>
<USPrice>39.98</USPrice>
<shipDate>1999-05-21</shipDate>
</item>
</items>*
</purchaseOrder>
Reply With Quote
  #3  
Old February 9th, 2007, 09:25 AM
motowner's Avatar
motowner motowner is offline
Senior eCharchan
 
Join Date: May 2006
Posts: 1,647
motowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond reputemotowner has a reputation beyond repute
Re: Oracle External Table to Load XML File

Quote:
Originally Posted by prosedevi
Try like this -
.
.
.
Thanks, prosedevi. Will try it out.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get a count or rows in a very large Oracle table? echarcha How to 58 May 22nd, 2015 05:54 AM
India's internal and external conflicts ... tantric_yogi Friday Special 15 June 9th, 2010 07:01 PM
file sharing program makers liable for illegal file sharing. vakil sahib Taaza Khabar - Current news 10 June 29th, 2005 09:02 AM
Load Shedding now in Mumbai too! Alibaba Taaza Khabar - Current news 12 May 4th, 2005 12:29 AM
Getting data off an Access file into an ASP File YedaAnna SoapBox 8 March 26th, 2003 10:53 PM


All times are GMT -7. The time now is 08:29 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Site Copyright © eCharcha.Com 2000-2012.