Manage Learn to apply best practices and optimize your operations.

How to import comma-delimited text file to Oracle table

We have to import a text file (delimited with commas) to an Oracle table via our application with PL/SQL.

I am a newbie for the Oracle platform; for the last five years we've been using SQL Server, and now we switched to Oracle. Coming to the point, we have an application in which we have to import a text file (delimited with commas) to an Oracle table via our application. Our application tool is PL/SQL. So is there any way to import a text file in Oracle via coding? Earlier we were using BCP (bulk insert utility) in SQL Server. Please suggest an alternative method. Thanks.

You already know about SQL Server's BCP utility. Oracle's similar utility is called SQL*Loader. SQL*Loader will load the contents of a text file into an Oracle table. Oracle extended this utility with something called External Tables. With External Tables, you can access a text file with SQL commands just as if it were an actual table. External Tables uses the SQL*Loader engine before passing the data to the SQL engine.

Click here for a document that details SQL*Loader and External Tables.

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.