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: sql command for exporting data to ascii file

Re: sql command for exporting data to ascii file

From: Kumar, Sai (EXCHANGE:PERPK:3374) <saikumar_at_nortel.com>
Date: Tue, 26 Jan 1999 16:58:36 -0500
Message-ID: <36AE3A8C.1E74FE3F@nortel.com>


Stefan den Engelsman wrote:

> Hello,
>
> Can anyone tell me if oracle does have a sql command which exports the
> contents of a table to an ascii file :
>
> for example :
>
> copy table test
> (
> field1 colon,
> field2 colon,
> field3 nl
> )
> into 'file';
>
> would result into :
>
> file :
> ---------------
> value1:value2:value3
> value1:value2:value3
> etc.
>
> Thanks in advance



Hello,

Try this :-

spool abcd.txt
select field1,':',field2,':',field3 from <table_name>; spool off

Thanks
Sai Received on Tue Jan 26 1999 - 15:58:36 CST

Original text of this message

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