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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delimited with tab

Status
Not open for further replies.

MDurkee22

Programmer
Joined
Aug 22, 2007
Messages
5
Location
US
I need to copy out a fox pro table to a tab delimited .txt file. When I simply copy out as "delimited with tab" I get the "" around the tab. I read in the help that you could copy to a delimited file using "with blank" and "with tab." Is that possible? I get only errors when I try to accomplish it.

Thanks in advance for your help.
Maxanne

Maxanne Durkee
Old Honolulu Trading Company
 
COPY TO FileName
[DATABASE DatabaseName [NAME LongTableName]]
[FIELDS FieldList
| FIELDS LIKE Skeleton
| FIELDS EXCEPT Skeleton]
[Scope] [FOR lExpression1] [WHILE lExpression2]
[[WITH] CDX] | [[WITH] PRODUCTION]
[NOOPTIMIZE]
[[TYPE] [FOXPLUS | FOX2X | DIF | MOD
| SDF | SYLK | WK1 | WKS | WR1 | WRK | CVS | | XLS | XL5
| DELIMITED [WITH Delimiter | WITH BLANK | WITH TAB
| WITH CHARACTER Delimiter]]]
[AS nCodePage]

 
Thanks gfrlaser,
I see those code tips also when I am trying to write out the table. Problem is that I can't get the delimited output to omit the quotes around the tab.
example: copy to [filename.txt] delimited with tab
This will give me "field1" "field2" "field3" "

What I would like to have is a blank delimiter around the tab. Is that possible in foxpro?
Maxanne

Maxanne Durkee
Old Honolulu Trading Company
 
This is the syntaxt (hard to figure out):

Copy to test.txt type delimited with "" with tab
 
Thanks so much markros,
I tried it with this syntax:
copy to test.txt type delimited with " " with tab and it just continued to throw an error. This is valuable, thanks for the help.
Maxanne

Maxanne Durkee
Old Honolulu Trading Company
 
As markros stated:
Code:
COPY TO TEST.TXT TYPE DELIMITED WITH "" WITH TAB
(no space between the two double-quotes)

This works as requested for me.

What version of VFP are you using, and what error are you seeing ?
 
Brigmar is right, no space in the delimiter. I am curious what error you got. Still get an error message with no space in the quotes?
 
I was just getting a syntax error. I understood your instruction the first time. I was just explaining to Markros why I wasn't getting it on my own. I was the one putting the space in between the quotes. When I tried it as he suggested everything worked beautifully.
Thanks everyone for your help.
Hope I can return the favor sometime.
Maxanne

Maxanne Durkee
Old Honolulu Trading Company
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top