Re: export to ascii file

From: Laurie D. Miller <lmiller_at_lindy.stanford.edu>
Date: 1997/04/02
Message-ID: <33427D7C.1EC9_at_lindy.stanford.edu>#1/1


Guenter Radakovits wrote:
>
> 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
>
> *********************************************************
> select * from dept;
> DEPTNO DNAME LOC
> ---------- -------------- -------------
> 10 ACCOUNTING NEW YORK
> *********************************************************
>
> *********************************************************
> select deptno||';'||dname||';'||loc||';' from dept;
>
> 10;ACCOUNTING;NEW YORK;
> *********************************************************
> try this ways and compare the sizes of the two outputfiles
>
> good luck
> guenter

Oracle's SQLLOADER will export to Ascii files and you can use column delimiters.

-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Laurie D. Miller           Stanford University
Database Administrator     lmiller_at_lindy.stanford.edu
Received on Wed Apr 02 1997 - 00:00:00 CEST

Original text of this message