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: SELECT stmt to file with tab delimiters

Re: SELECT stmt to file with tab delimiters

From: Ed Prochak <edprochak_at_gmail.com>
Date: Wed, 5 Dec 2007 20:07:10 -0800 (PST)
Message-ID: <50b97d13-1e37-4d70-98de-1e10a1b64b7b@t47g2000hsc.googlegroups.com>


On Dec 5, 6:18 pm, Occidental <Occiden..._at_comcast.net> wrote:
> Suppose you have a SELECT stmt of form:
>
> SELECT Field1, Field2, Field3
> FROM Table1
> WHERE etc
>
> What would it take to generate a file from the output this stmt, where
> the fields are tab-delimited? I'm working with an Oracle guy who
> claims it is impossible. In mysql it is easy
>
> SELECT Field1, Field2, Field3
> INTO OUTFILE 'filename'
> FIELDS TERMINATED BY '\t'
> LINES TERMINATED BY '\n'
> FROM Table1
> WHERE etc

Another solution involves the COLSEP (Column Separator) in SQLPLUS.

Look up the SET command for the COLSEP option.

   Ed Received on Wed Dec 05 2007 - 22:07:10 CST

Original text of this message

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