|
Re: Convert oracle table into a .dbf file [message #137270 is a reply to message #137044] |
Wed, 14 September 2005 03:44 |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
Can the steps mention below helps u ?
1. create a .sql file for eg:
test.sql
Quote: |
set heading off
set feedback off
spool &&1
select * from table_test;
spool off
set heading on
set feedback on
exit
|
2. then run this .sql file from command prompt like this :
c:\> sqlplus username/password c:\test.sql c:\test_output.dbf
U can try this out , the result of the table data will be spooled out in test_output.dbf.
regards,
tarun
|
|
|
|
Re: Convert oracle table into a .dbf file [message #137334 is a reply to message #137312] |
Wed, 14 September 2005 13:08 |
|
Barbara Boehmer
Messages: 9101 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
Spooling from Oracle will put the data into an ascii text file, not a foxpro database file (.dbf). I would suggest adding a delimiter, for example use "set colsep ','" to create a comma-separated value (.csv) file, then create an empty FoxPro table of the same structure and use your FoxPro utilities to load the text file into the database file. It has been a long time since I used FoxPro and I mostly converted FoxPro to Oracle, not the other way around, but I believe the FoxPro append command was what I used to load .csv into .dbf. I recall that FoxPro was a little picky about file extensions, so you may need to make sure that your delimited ascii text data file ends in .txt. I used FoxPro 2.6 for DOS, so things may be different nowadays using Visual FoxPro. Just out of curiosity, why are you doing this? Most people migrate from FoxPro to Oracle, not the other way around. Also, if you give us a bigger picture of what you are doing, there may be a better way, like ODBC or some such thing. Is this a one-time thing or something you will be doing on a recurring basis? You might also see if you can find a FoxPro forum and see what they say there.
|
|
|