Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert corrupt csv to fixed width SDF
Message
De
20/12/2005 19:50:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01079385
Message ID:
01079754
Vues:
20
Yes, thats what I tried just now.
	IF NOT EMPTY(lcStr)
		lcStr = STRTRAN(lcStr,[,"],[|])
		lcStr = STRTRAN(lcStr,["],[])	&& get rid of any extra quotes
		FPUTS(lhOut, lcStr)
	ENDIF
This correctly produces a file delimited with | characters. I looked at it with a text editor and it has one record per line, delimited with those pipes.

However,

Issuing :
Append From yardi.Csv Type DELIMITED WITH |
where that file is the one of interest, does not get what I expected. The cursor has the 1st field correctly populated, but others are not. Sometimes, that's the only field in the record that ends up with data. Other times, several concatenated fields end up in a single field

like this:
 PLAT 202||FOUNTAIN HILLS|AZ|8
I don't understand this.

>Jim,
>
>You're processing file line by line anyway. You can eliminate the double quotes in the process. Something like
lcStr = STRTRAN(lcStr, ["], [])
>
Jim Newsom
IT Director, ICG Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform