Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading data from a text file to a table in oracle

Tags:

oracle

I have got 2 questions.

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

Someone please help me.

Thanks in advance.

like image 578
Aby Avatar asked Sep 20 '10 10:09

Aby


1 Answers

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

File Input:

  • UTL_FILE
  • SQL*Loader
  • DBMS_XSLPROCESSOR.READ2CLOB
  • External Tables
  • xmltype.createXML with BFILE
  • Oracle SQL Developer or other third-party tool

File Output:

  • UTL_FILE
  • Data Dump Utility (wrapper around UTL_FILE)
  • DBMS_XSLPROCESSOR.CLOB2FILE
  • External Tables
  • SQL*Plus script
  • Oracle SQL Developer or other third-party tool
like image 186
Jon Heller Avatar answered Nov 15 '22 06:11

Jon Heller