Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pulling data from a non-standard ascii file
Message
De
27/02/1997 12:22:24
Paul Wei
Fib, State of Michigan
Lansing, Michigan, États-Unis
 
 
À
27/02/1997 10:39:25
Richard Reid
R C R Enterprises, Inc.
Jonesboro, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00022218
Message ID:
00022248
Vues:
45
>I am working on a project to create an app which consistently pulls data from an ascii file. The file is standard in terms of fields, but they do not line up into clean columns. Therefore, I need to be able to pull 20 lines in format x, or into table x, and the next 10 in format y, or into table y. What syntax would I use to switch from one format to another when appending from one sdf ??

Richard,

If there is something in each ascii record which would tell you which format, x or y, this record belongs to, then you can test for it during the APPEND by using something like:
  select x
  append from ascii.txt for x.format_fld = 'X' type sdf

  select y
  append from ascii.txt for y.format_fld = 'Y' type sdf
Each APPEND would go through the whole ascii file but will only append records matching the FOR condition.

Paul
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform