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: Oracle Newbie Question

Re: Oracle Newbie Question

From: TurkBear <johng_at_nospam.mm.com>
Date: Wed, 09 Dec 1998 16:18:15 GMT
Message-ID: <366ea08d.5037974@news2.mm.com>


Not to be a smart a.., but SqlLoader is for loading data not 'unloading' it...

I use a report writer to export table data, but SqlPlus can do it with a spool specification - for instance:
spool c:\myfiles\datafromt1.txt
select * from t1 order by whatever;
spool off

datafromt1.txt will contain the data from the table.

NOTE: this is for illustration only, actually using this code will result in a sloppy, overlarge and, generally messy file...you need to set some SqlPlus parameters first ( see Column, pagesize, headings, etc ) and you will probably want some RTRIM,LTRIM, and concatenation of fields to better control the output format....
That's why I use a report writer ( Crystal ) and export into a CSV file that I can use in other apps ( it also exports into almost any format you want ( wpg, xls,http, plain text,delimited text, etc)....  

 Hope it helps...
John Greco
Oracle DBA/Application Developer

MarxR_at_claruscorp.com ("Marx, Robert") wrote:

>Is there any way to dump a table in Oracle 7.3 to a
>
>flat file...in much the same way that the bcp utility
>
>can be used in Sybase and SQL Server.
>
>
>
>I would have thought that SQL Loader would allow
>
>something like this.
>
>
>
>Any help in greatly appreciate.
>
>
>
>Thank you,
>
>
>
>
> -**** Posted from remarQ, Discussions Start Here(tm) ****-
>http://www.remarq.com/ - Host to the the World's Discussions & Usenet

To reply please remove the 'nospam' part of the address Received on Wed Dec 09 1998 - 10:18:15 CST

Original text of this message

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