Re: SPOOL Problem

  • From: "Yongping Yao" <yaoyongping@xxxxxxxxx>
  • To: "Graeme.Farmer@xxxxxxxxxx" <Graeme.Farmer@xxxxxxxxxx>
  • Date: Wed, 7 Jun 2006 12:01:28 +0800

Thanks a lot.
I will try UTL_FILE.
I "unload" data to feed a linux-based program. That program uses text files
as input and I cannot modify it :( .
I'm now reading http://asktom.oracle.com/~tkyte/flat/index.html. It seems a
useful solution.

BTW, I tried to search on Metalink. There's no hits.

On 6/7/06, Graeme.Farmer@xxxxxxxxxx <Graeme.Farmer@xxxxxxxxxx> wrote:

You would probably be best to write a PL/SQL procedure to achieve this making use of UTL_FILE to write directly to a file rather than via the SPOOL mechanism in SQL*Plus.



Using PL/SQL gives the ability to perform BULK fetches from the source
data too which can significantly improve performance.



If you look hard enough, you will probably find some code on the web that
will unload to CSV or SQL*Loader format text files.



What is the purpose of writing the tables to text file? Do you need to
archive the data in a portable format? Loading data to another system?
Different platform/rdbms?



Cheers

* *

*Graeme Farmer *


-- Yao Yongping Learning Oracle, UNIX/Linux... Love Reading, Classical Music, Philosophy, Economics etc. Blog: http://spaces.msn.com/members/yaoyp/

Other related posts: