Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Translating txt file (from scanner) to records in VFP 6
Message
De
14/08/2002 16:57:46
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
 
 
À
14/08/2002 14:22:57
Lynette Tillner
Associated Valuation Services
Modesto, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00689678
Message ID:
00689733
Vues:
36
This is tricky - just roughly:

-since it seems the Tags are all numeric,
-read sequentially thru the Table and save the ROOM,DATE and QTY into Mem Vars as 'current' values, then:
- loop thru all the following Tags using something like Isdigit() to determine numeric fields, adding a new rec into target table for each and duplicating the Room,Date,Qty...
- Then you'll discover another set of R/D/Q to make current, and Repeat...

Just to get you started,

-Irv.


>I have scanned barcode data that I need to make single records out of.
>It's easy enough to move import the text file into one field (A)and move the data to separate fields (B)
>
>But my question is, once I have the data in separate fields, how do I fill that for each record to look like (C)
>Any pointers in the right direction would be greatly appreciated!
>
>See example:
>
>(A) The text file format is:
>
>$Site%130
>$RM%999
>$DATE%MMDDYY
>$QTY%1
>99999
>99998
>99997
>99996
>$RM%990
>$DATE%MMDDYY
>$QTY%1
>99995
>99994
>etc.....
>
>(B) I end up with :
>
>IMPORT --- SITE ----ROOM --- DATE ----- QTY ------ TAG
>$SITE%130 130
>$RM%999 999
>$DATE%MMDDYY MMDDYY
>$QTY1 1
>99999 99999
>99998 99998
>99997 99997
>99996 99996
>$RM%990 990
>$DATE%MMDDYY MMDDYY
>$QTY1 1
>99995 99995
>99994 99994
>
>(C) and what I need is:
>
> 130 999 MMDDYY 1 99999
> 130 999 MMDDYY 1 99998
> 130 999 MMDDYY 1 99997
> 130 999 MMDDYY 1 99996
> 130 990 MMDDYY 1 99995
> 130 990 MMDDYY 1 99994
>
>Thanks!
>
>Lynette
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform