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: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Thu, 30 Mar 2000 13:55:48 GMT
Message-ID: <38E35CE4.657E0D28@edcmail.cr.usgs.gov>


You'll also want to use RTRIM to remove the trailing blanks.

HTH,
Brian

Moore wrote:
>
> 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
> >
> >
> >
> >

--



Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my company!
Received on Thu Mar 30 2000 - 07:55:48 CST

Original text of this message

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