Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Delimited Output

Re: Delimited Output

From: Richard Gowan <roxl_at_ozemail.com.au>
Date: Tue, 16 Nov 1999 13:11:05 +1100
Message-ID: <y23Y3.3230$MZ.24657@ozemail.com.au>


> I'm a relative Oracle newbie and I need to out put the entire
> contents of a table (some 200,000 records) into a delimited
> ASCII text file.
>
> I'm using Oracle 7 on Solaris..
>
> How do I do it, I've looked through all the docs I have and can't
> find anyway of doing this.
>
> rex..

Conceptually - all you want to do is a

SELECT col1 || ',' || col2 || ',' || col3 -- etc FROM tablename

You need to spool this into a file using the SPOOL "name" and SPOOL OFF commands, and you will probably mess with SQL*Plus a bit to turn off the heading info (and maybe the pagesize also)

    SET HEADING OFF The script supplied by Conan appears to do all this automatically for a given table.

Cheers,

Richard Gowan Received on Mon Nov 15 1999 - 20:11:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US