|
Re: How to Read Xml Data into Oracle Database [message #628671 is a reply to message #628669] |
Wed, 26 November 2014 22:41 |
|
SunilJdh
Messages: 17 Registered: October 2014 Location: India
|
Junior Member |
|
|
I do it This Way:
/*-- Reading XML File have to create Directory 'TEST_DIR' --*/
declare xDoc xmltype := xmltype(BFILENAME('TEST_DIR','TestData.xml' ),('AL32UTF8'));
rc_xml sys_refcursor;
begin
open rc_xml for select xt.* from xmltable('//Root/Data'
passing xDoc
column
"ColumnName" datatype Path 'ElementName',
"ColumnName" datatype Path 'ElementName') XT;
end;
[Updated on: Wed, 26 November 2014 22:43] Report message to a moderator
|
|
|
|
Re: How to Read Xml Data into Oracle Database [message #628719 is a reply to message #628671] |
Thu, 27 November 2014 06:28 |
|
stalin4d
Messages: 226 Registered: May 2010 Location: Chennai, Tamil Nadu, Indi...
|
Senior Member |
|
|
SunilJdh wrote on Thu, 27 November 2014 11:41I do it This Way:
/*-- Reading XML File have to create Directory 'TEST_DIR' --*/
declare xDoc xmltype := xmltype(BFILENAME('TEST_DIR','TestData.xml' ),('AL32UTF8'));
rc_xml sys_refcursor;
begin
open rc_xml for select xt.* from xmltable('//Root/Data'
passing xDoc
column
"ColumnName" datatype Path 'ElementName',
"ColumnName" datatype Path 'ElementName') XT;
end;
Hi thanks for the reply, but actually we have more than 10 folders/drives from different servers so how to loop that and fetch those xml files data into a DB Table or tables.
[Updated on: Thu, 27 November 2014 06:28] Report message to a moderator
|
|
|
|
|
|
|
|
Re: How to Read Xml Data into Oracle Database [message #628897 is a reply to message #628895] |
Sun, 30 November 2014 07:25 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
ORA-22288: file or LOB operation %s failed\n%s
*Cause: The operation attempted on the file or LOB failed.
*Action: See the next error message in the error stack for more detailed
information. Also, verify that the file or LOB exists and that
the necessary privileges are set for the specified operation. If
the error still persists, report the error to the DBA.
|
|
|