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: extraction of data from Oracle table

Re: extraction of data from Oracle table

From: Moore <rlmoore_at_purdue.edu>
Date: Wed, 29 Mar 2000 11:00:35 -0500
Message-ID: <Pine.SOL.4.10.10003291040030.9745-100000@herald.cc.purdue.edu>

Select	field1 ||','||
	field2 ||','||
	field3 ||','||
From	Table1,

etc...

In SQL*Plus

Set pagesize 0

[Optinal:

The following is not absolutely required but depending on the ammount of data the effort can speed up the process a bit:

Determine the sum of the column lengths of the fields that your query returns (call that number 'n' for grins).

In SQL*Plus

Set linesize 'n'

End Optional]

IN SQL*Plus:

Spool path file name

Execute the query.

Remember to issue the spool off comand!

You now have a comma deliminated file.

On Wed, 29 Mar 2000, Gerry Grant wrote:

> I am trying to provide a comma deliminted file from an Oracle table. I have
> used a select statement with RPAD and nvl statements and spooled it to a
> file to get fixed length fields with success. I'm at a loss as to where to
> start to get a comma deliminted output.
>
> Any help, hints would be appreciated
>
> Gerry Grant gerry.grant_at_ttu.edu
> Texas Tech University
>
>
>
>
Received on Wed Mar 29 2000 - 10:00:35 CST

Original text of this message

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