Loading data from a text file into a table in oracle

I have 2 questions.

  • Is there a way to load data into a table in Oracle from a .txt file other than using the SQL loader?
  • How to unload data from a table into a text file?

Someone please help me.

Thanks in advance.

+6
oracle
source share
6 answers

There are many options. It depends on the context - your version of Oracle, the data format is on the client or server, etc. Here is a quick list, there may be many other methods:

File entry:

File output:

+6
source share
  • Loading data from a txt file other than a sql loader - External table, package UTL_FILE
  • Upload data - UTL_FILE package

Use Google with these keywords, you will find a lot of information.

+1
source share

Oracle has a free SQL Developer tool ( http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html ) that you can use to do this.

-one
source share

To offload the data, you can simply unwind the file. In SQLPLUS, create a spool file, and then run a select query that reads from the table, format the data, and return the row. Data will be written to a file.

Other solutions are already mentioned. Tools, including TOAD, have functions for creating files.

-one
source share

This is an old topic, but I think the following information can help a lot:

 |-----------------|----------------|----------------| | LOAD METHOD | DATA ON CLIENT | DATA ON SERVER | |-----------------|----------------|----------------| | SQL*Plus | Yes | No | | SQL*Loader | Yes | No | | External Tables | No | Yes | | BFILES | No | Yes | |-----------------|----------------|----------------| 

Source: https://blogs.oracle.com/searchtech/loading-documents-and-other-file-data-into-the-oracle-database

-one
source share

Curreent Solution: loading data using SQL * Loader (2016 using Windows 10 and Oracle 12c client)

fooobar.com/questions/873514 / ...

-2
source share

All Articles