Q

Exporting a table to ASCII-delimited format

What's the fastest way to export an Oracle table to ASCII-delimited format?

What's the fastest way to export an Oracle table to ASCII-delimited format?
Probably the fastest way is to use a simple SELECT statement in SQL*Plus and spool the output to a file. For instance, assume that my table EMP and three columns, EMPID, ENAME and PHONENUM. I can use the following to place the table's data into a comma-delimited format:
set pagesize 0

set heading off

set feedback off

spool c:emp.txt

SELECT empid||','||ename||','||phonenum FROM emp;

spool off
There are other utilities out there that will perform the same function. You can use ODBC to place the data in MS Access or MS Excel and then save the data in a comma-delimited format. Tom Kyte has good info on his AskTom Web site. Additionally, I put "oracle comma delimited format utility" into Google and got thousands of hits.
This was first published in January 2006

Dig deeper on Oracle database backup and recovery

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close