Johan Ulff  writes: >Is there anybody who knows how to export a table from ORACLE to an 
>ordinary ASCII file?
>I know there an EXP command i Oracle that writes an archive dump file 
>file in a Oracle format but I don't find any way to use this command to 
>export to an ASCII file instead.
>Is the only way to use embedded SQL from a C or VB program and write the 
>ASCII file?

There is a much simpler way. Using SQL*Plus, you can create an ASCII 
file, delimiting all fields with any character you want.
For example, suppose you want to create a comma-delimited file for the 
following table:
name varchar2(30),
hr   varchar2(3),
rbi  varchar2(3),
batting_avg  varchar2(5)
To make the file, write the following script:
set pagesize 0
set pause off
set header off
select name||','||hr||','||rbi||','||batting_avg
from BATTER;
spool off
Note that the commas will serve as the delimiters, and can be
easily changed to whatever you need. Also, Oracle adds ".lst" to the name
of the spool file unless you specify another extension.
Good luck!
-Ari Kaplan

<-> email                     <->
<-> WEBPAGE                           <->

Back to Ari Kaplan's Home Page Kaplan's Home Page