AllExperts > Oracle 
Search      
Oracle
Volunteer
Answers to thousands of questions
 Home · More Oracle Questions · Answer Library  · Encyclopedia ·
More Oracle Answers
Question Library

Ask a question about Oracle
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Edson
Expertise
I can answer questions about Sql (including Sql tuning), pl/Sql and a bit of oracle administration

Experience
I work as a consultant in Brazil and I face problems of all kind in oracle every day development.

Education/Credentials
INFNET

 
   

You are here:  Experts > Computing/Technology > Oracle > Oracle > data transfer from CSV file to database.

Oracle - data transfer from CSV file to database.


Expert: Edson - 6/6/2009

Question
QUESTION: Hello Edson,
I want to transfer the data stored in CSV(comma seperated value) file to Oracle Database table.
Can you guide me how to do this???

ANSWER: Hi there.

There are some good ways to do it. The simplest way is to use a interface, just like PL/SQL Developer or SQL Navigator. This applications have a import suite. In PL/SQL developer it is in tools --> import file.

If you donīt have the possibility to use this applications, so you should think about SQL Loader. Itīs Oracleīs import tool.

The last tip would be to use utl_file and utl_raw. But specifically in this case you will have to create a directory in oracle. ASk your DBA the possibility of creating one.

See the best option and mail me back. So we star with the chosen.

Wait your reply

---------- FOLLOW-UP ----------

QUESTION: Thank you for the suggestions.
But, I have to write my own code that parses the CSV file and generate INSERT statements to load into your Oracle database.
Can you help??

Answer
So you must have to use the final choice, the utl_file.

Utl_file is a oracle�ackage that allows read csv files or others files by pl/sql. But as I told you, you have to create a directory.

First see the possibility of creating one, then we see the solution together.

Regards.
Wait reply

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.