Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Luna.

Asked: February 29, 2012 - 7:18 am UTC

Last updated: February 29, 2012 - 7:54 am UTC

Version: 10

Viewed 1000+ times

You Asked

Hello Tom,

Can you tell me what is better way of extracting data from several joined tables to *.CSV files?
Is it UTL_FILE or EXTERNAL TABLES?


File should be transfered to a third party via SFTP on a dayly (weekly) basis.

Thank you for your help.


and Tom said...

utl_file is appropriate if you want to procedurally process the data in the files line by line.


external tables are appropriate when you want to load the data in the files into a table or use them in a query.


But - you seem to be asking "what is the best way to WRITE a CSV file". That is something that an external table cannot do.

see
http://asktom.oracle.com/Misc/httpasktomoraclecomtkyteflat.html

for various approaches to unloading to a CSV file

Is this answer out of date? If it is, please let us know via a Comment