Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing CSV with embedded commas
Message
De
29/05/2015 14:31:49
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
29/05/2015 13:14:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01620336
Message ID:
01620355
Vues:
46
>>The problem is that there is not a clear definition of what constitutes a new column value. I would suggest at the source either delimiting with a different character (perhaps TAB or pipe | symbol). I don't use commas as the separator as this has the problem you are now having.
>>
>>Another suggestion is to use an XML formatted file for the data.
>
>Up until a few months ago, they were sending us the files in SDF format. Life was happy. Then they changed the format, and did not tell us. The application was failing, but not reporting the failure. It was only when started getting reports that the information in our database was out-of-date, that we noticed that the format had changed.
>I have put in a request with my bosses to talk to the source about the file format.

Argh.

Yes this will be the result of sdf - it just reads characters

Can you talk them do use different delimiter (we are happy with | for that) or enclose any character in something like " "? And import not as CSV but as DELIMITED. This is not fail save, but better then pure CSV. We have skipped comma because from time to time somebody forget to switch number format. German numbers use decimal comma (3,1415926) so it was fun anyway. And this was much more ugly to parse out since numbers normaly will not be enclosed in " ".
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform