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

Home -> Community -> Usenet -> c.d.o.server -> Re: Export data in ASCII format.

Re: Export data in ASCII format.

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 24 Oct 1998 02:22:57 GMT
Message-ID: <363838a7.2862599@netnews.worldnet.att.net>


On Fri, 23 Oct 1998 16:12:38 GMT, kelvinw_at_asymetrix.com wrote:

>I have a bunch of tables needed to be exported in ASCII format with
>comma delimited and loaded up to a spreadsheet. I have tried the
>exp73.exe utility. It seems to me that it can only export table data
>in a Oracle format. Does anyone have an idea how to export table
>data in ASCII format.

Yes. You can use SQL*Plus for this. Do something like the following:

	SET PAGESIZE 0
	SET HEADING OFF
	SPOOL c:\somefile.csv
	SELECT column_1 || ',' || column_2 || ',' || column_3
	FROM your_table;
	SPOOL OFF

If you have numeric fields, you may want to use TO_CHAR to convert them to characters. You may also want or need to trim spaces from a field. You can use LTRIM and RTRIM for this purpose.

regards,

Jonathan Received on Fri Oct 23 1998 - 21:22:57 CDT

Original text of this message

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