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

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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: