• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

dbase table to .csv

Hi,

I am trying to export a dbase table, from dbase IV, to Oracle using DTS and I am getting Error at Destination for Row number 145301. Errors encountered so far in this task:1 ROW-00060:  Internal error: [dainsert, 16].  I was wondering is there a way were you can make a dbase table into a .csv file?
0
Gladys522
Asked:
Gladys522
  • 4
  • 3
1 Solution
 
CarlWarnerCommented:
If you have dBASE IV, you should be able to issue commands similar to the following to get it done:

USE mydata[.dbf]
COPY TO mydata.csv TYPE CSV
0
 
Gladys522Author Commented:
My bad, I am using dbase 5.  Are the commands similar?
0
 
CarlWarnerCommented:
They should be.  But, it's been a while since I had dBASE 5 on any PC of mine.

That's, in general, pretty standard dBASE (xBase) syntax.

Worse comes to worse, look up COPY TO in the dBASE 5 Help for the particulars.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
Gladys522Author Commented:
I am trying to take a look at the .csv with textpad and I get wierd characters.  I want to be able to input a delimiter and ftp this file.  Am I doing something wrong?  To copy the file to a csv in dbase I input: use g:\monthend\cancel.dbf then I input: copy to cancel.csv  When I input: copy to cancel.csv TYPE CSV I get an error Unrecognized phrase/keyword in command.
0
 
CarlWarnerCommented:
A direct COPY TO without a clause at the end will simply output the .dbf as is, except with your .csv extension.  Of course, that is definitely not what you want or intended.

There needs to be a clause/switch after COPY TO filename to tell dBASE 5 to export/copy the dbf data as Comma Separated Values into what will end up being a text file with appropriate delimiters.

Assuming you able to get to a Command line in dBASE 5, try to type in HELP COPY TO and see if that calls up the Help file and the specific syntax to dBASE 5 to get it done as a CSV file.
0
 
Gladys522Author Commented:
Carl,

Thanks for your help.  I found out I have to type:  copy to tablename.csv TYPE DELIMITED.
0
 
CarlWarnerCommented:
Ah, OK.  Great.  Much better than battling a recalcitrant DTS.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now