Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help about Exporting .dbf to .csv

Status
Not open for further replies.

Const

Programmer
Jun 4, 2002
6
CA
I wanted to export the following table to a .csv file

sField1 sField2 sField3
Father Mother Brother

I obtained the following result:

sField1,sField2,sField3
Father,"Mother","Brother"

The code I used is:
Select 1
COPY TO (curdir() + "table") TYPE CSV

I want to know if it's normal that quotes appear for the fiels appart the first one.
Thanks
Const
 
I sent the thread184-320865 and it didn't work as they proposed me. If you have time please try it. Records in the first fields don't have the added quotes.

Thanks
Const
 
What is the data type of the first field? If it is character like the others, it indeed should have quotes.

Dave S.
 
That was weird. Quotes are not added to the records of the first field ( Data type = Character ).
thanks
May be it's Fox Pro config.
You can try it
 
I can't recreate your scenario. It works fine for me.

Like they say at MS Support:
"Your lightbulb is burned out? Ours works fine. There is no need to change yours."

Dave S.
 
What version and SP level of VFP 6 / 7 are you using? e.g. VFP 6.0 SP5 or VFP 7.0 SP1. (Help -> About VFP will give you this info.)

Rick


 
Const,
Your first fields are not the 1st fields but the field headings. In cas you would rather not have the field headings in your exported csv file you should change the delimiter.
Try e.g. COPY TO MyFile2.CSV DELIMITED WITH "'" or even COPY TO MyFile2.CSV DELIMITED WITH " ". Observe the results.

Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top