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

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.