473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Inserting XML into Oracle Table

Hi All,

I want to pick one xml file from a location and insert it into a coulmn in the database (CLOB). Can you please let me know how can i do that? Steps should be:-

(1) There is a file A.xml in a location.
(2) My code runs and puts the file in the table column.
eg if i select data from this coulmn, i should get the something like this:-
<?xml version="1.0" encoding="UTF-8"?>
<Location>
<country>China</country>
</Location>

An early response would be highly appreciated..

Regards,
Amit
Oct 24 '08 #1
4 7049
debasisdas
8,127 Expert 4TB
what is the problem ?

are you unable to store and retrive data into CLOB field ?
Oct 25 '08 #2
what is the problem ?

are you unable to store and retrive data into CLOB field ?
Hi,

i don't know how to do that. Can you please send me a sample code for doing that?

Regards,
Amit
Oct 26 '08 #3
debasisdas
8,127 Expert 4TB
please find related discussions here , here and here.
Oct 26 '08 #4
please find related discussions here , here and here.
Hi,

Thanks for the help. I was able to insert xml as clob in one of my tables. So now my code works perfectly when i have one file in teh specific directory. But now the requirement is :-

(1) I have one logical directory.
(2) There i have 10 or 15 files with any arbitary name.
(3) My code should pick them one by one and insert them into database.

There is no limit on the number of files or their naming. I know i can use something like EOF for a file or some dbms_lob function, but i have not been to find anything for the directory. I need something like select file_name from direcctory which i can use in my cursor loop and it should traverse each file and correspondingly insert that into database.

Thanks in advance your response.

Best Regards,
Amit
Oct 27 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Raj Kotaru | last post by:
Hi, In sqlplus, I can insert a single row using: insert into employee (name, salary, hiredate) values ('xyz', '86378', sysdate); Is there a modification of the insert command that will...
2
by: KAdams | last post by:
Hello Has anyone ever grabbed records from oracle and inserted them into SQL Server. I have been tasked with converting some DTS packages into VB.net applications. What I want to do is not have...
2
by: Charles Wilt | last post by:
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
2
by: PraveenKadkol | last post by:
I have 25000 Rows, that needs to be inserted into Oralce table from MsAccess When i run below code, i am not getting any error message, Still records are not inserting into destination table. ...
1
by: jaishu | last post by:
When i try to insert data into a backend Oracle table (with ODBC) using a form, (i use docmd.runsql "insert....") Access gives me a message like"You are trying to append 1 row to the table are you...
16
priyan
by: priyan | last post by:
Hi all, I had created a view from a table employee from my database. View is created sucuessfully and when i inserted data into employee table it is also updated in the view but i tried to...
9
by: femina | last post by:
in object views i have a table customer CUSTID NOT NULL NUMBER NAME VARCHAR2(25) STREET ...
11
by: cavbeek | last post by:
Hi all, First of all let me admit that I have hardly any SQL knowledge, so I might be making very silly mistakes ;-) I've configured some triggers (with the help of some templates etc.),...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.