Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: extraction of data from Oracle table
Select field1 ||','|| field2 ||','|| field3 ||','|| From Table1,
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