Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: export to ascii file
Raul Sanchez wrote:
>
> Hi,
>
> I would like to know how or where I might find information on how
> to export a table to an ascii file in ORACLE (for example, in SYBASE
> I would use the following:
>
> bcp databaseName..tableName out dataFile -c .....
>
> In order words, what is the equivalent to this statement above
> in ORACLE. Thanx for you kind help in advance.
>
> --Raul
hi,
the spool statements are OK but the "LINESIZE" option must be as long as the sum of the length of the columns of the table or the sum of the length of the columns you want to spool out
otherways you would get "n" lines instead of one per record
another option is you can concatenate the columns
separated by a character of your choice the benefit is you save
space on the filesystem -
here you also must take care of the LINESIZE option
for example
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
10;ACCOUNTING;NEW YORK;
good luck
guenter Received on Tue Apr 01 1997 - 00:00:00 CST