# Databases > Oracle Convert dbf file to ASCII (text) file

## mohit1211

I want to convert the DBF File (which is generated using FoxPro) into the ascii (like text file (properly delimited by commas) and vice versa in oracle. Is there any use of java in this method. Plz reply me because its urgent.

Thanks in advance,
Mohit Sharma

----------


## krishnaindia2007

I do not know how to convert DBF to ASCII Directly. But in the following way we may convert DBF to excel , then excel to ASCII format. To convert DBF to excel use the following command.

Export to filename Type XLS. 
Then open the file in excel. Select save as type you want.

----------


## krishnaindia2007

To covert oracle data to ascii format use the following syntax

SPOOL XXX.TXT
SELECT FIELD1||','|| FIELD2||','||FIELD3 FROM TABLENAME;
SPOOL OFF;

----------

