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

append from with ;

Status
Not open for further replies.

muehling

IS-IT--Management
Mar 28, 2005
2
0
0
DE
Hello together,

best easter wishes from Germany.

I work with 2.6, have realised different programs, in which I would like to integrate different data sent
by frineds. The files are text files, delimited with a semikolon sign.

Here example:
A 110059;AkkuLadegerätMignonCamelion;;;Akku/Ladegerät/Bat.;nicht benannt;8.90;
A 140076;Board_Lithium-Batterie-Pack3.6/4.8V;;LEER:(ART.NR.12915);Board;;11.64;

When I try to load them, i.e. with the command :
append from test/test.csv type delimited with ';'
I got an error message, translated "Key not known"

If I do this command
append from test/test.csv type delimited with ;
nothing happens

I think the problem is this sign ; what we name semikolon

Then I tried to import it like read here
append type delimited with ; from test/test.csv
Now the command works, but the result is that nothing is seperated, my both samples are in the first column?

What can I do?


Thank you
Michael
 
Try :

append from test/test.csv delimited with character ';'
 
I don't think you're going to be able to read that data with APPEND FROM in FP2.x. It expects a delimiter around character values and a separator between fields.

You have a few choices:

1) Use the low-level file functions to read it one line at a time and parse it.
2) Preprocess the file to put the necessary delimiters.
3) Use a later version of FoxPro. I suspect with a little work, you could read this file with APPEND FROM in recent versions.

Tamar
 
Hi,

Here you have some sample code to do as suggested.

import data
thread182-929468

Append From Delimited with ;
thread182-667128
 
My suggestion:

Since the type CSV belongs to Excel, you can simply load into an Excel table, and from that can export to Dbase III data format.
 
Hi,
low level functions are the right way. It works.
Many thanks to all from Germany
Michael

Joke for the World:
Vegetarian is an old Indian word for lousy hunter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top