Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing a file that's not quite comma-delimited
Message
De
11/07/2007 13:42:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/07/2007 13:35:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01238841
Message ID:
01239399
Vues:
14
>Cetin,
>
>I haven't followed closely, but to assume almost nothing on the order of lines I'ld code
>FOR ix=1 TO alines(laLines,m.lcSample)
>   = alines(laFields, Alltrim(Str(m.ix)) + "|" + laLines[m.ix])
>   Insert into ("Curs_" + Alltrim(laFields[2]) ) from Array laFields
>endfor
>after having created the correctly named and structured tables/Cursors "Curs_MSH", "Curs_EVH" and so on for each line type with a sequential number corresponding to the original line number already thrown in. No need to mess with field/property names at all.
>
>Perhaps at the end throw in one replace and possibly even one alter table for each whole table.
>But I am too lazy too type much <g>
>
>regards
>
>thomas

If everything is regular (order of fields do not change etc) it'd be easy:) However there are other messages saying that this is an HL7 format (which I don't know the details) the situation might be much more complex than it looks.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform