Home > Ask the Oracle Database / Applications Experts > Oracle database design and architecture Questions & Answers > Importing text file to Oracle table
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Importing text file to Oracle table

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 14 August 2006
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 Microsoft .NET. 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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Oracle database design and architecture
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure
How to choose the primary key columns in an Oracle table
Understanding the data archiving definition
How to plan Oracle Grid Control Repository maintenance
What Linux flavor should I use for my Linux proof of concept in Oracle?

Oracle database design and architecture
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure
How to choose the primary key columns in an Oracle table
Understanding the data archiving definition
Review: Oracle's 11g R2 database has some good and bad
Scaling an Oracle database: What is the best strategy for you?

More Oracle-SQL Server integration tips
Storing data in Oracle 9i and SQL Server 2005
Accessing SQL Server through transparent gateway
Querying a SQL Server database from Oracle
ORA-28500 with database link
Lessons learned: Integrating Oracle and SQL Server
What is Oracle's default sorting behavior?
Importing data between Oracle 9i and SQL Server 2000
SQL ANSI standards and compliance
Running Oracle9i and SQL Server on a single system
Installing Oracle 9i and SQL Server on the same server

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
E. F. Codd  (SearchOracle.com)
extent  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
multidimensional database  (SearchOracle.com)
object-oriented database management system  (SearchOracle.com)
quad tree  (SearchOracle.com)
relational online analytical processing  (SearchOracle.com)
row  (SearchOracle.com)
splay tree  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


If you can place the text file on the database server, then you can use Oracle External Tables to load the data with a simple INSERT..SELECT statement. Assume that I have created an External Table called MY_EXT_TABLE, which is just a pointer to the text file, I can insert the data into MY_TABLE with the following command:

INSERT INTO my_table SELECT * FROM my_ext_table;
For more information on External Tables, read the Oracle Utilities Guide. Part III covers External Tables.

If the text file resides on the client side, then you'll have to install Oracle Client software on the workstation. This should be OK since you were using "bcp," which requires you to install SQL Server client tools on the workstation. Once you have Oracle Client on the workstation, you can use Oracle's utility for loading text files into a table. This utility is called SQL*Loader. The document I referenced above also covers SQL*Loader in Part II. SQL*Loader can also be used on the database server in lieu of External Tables.

Either solution does essentially the same thing, as both SQL*Loader and External Tables use the same engine to read the contents of the text file.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts