Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert corrupt csv to fixed width SDF
Message
From
20/12/2005 19:50:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01079385
Message ID:
01079754
Views:
19
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform