Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import from txt file
Message
 
To
21/09/2000 15:06:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00419269
Message ID:
00419279
Views:
27
>Hi to all
>I wonder how to acomplish the following:
>I have a text file (comma delimited) with the following format:
>1st colum is a 4 digit number (ie 9999)
>2nd column is a 4 digit number denoting the time (ie. 1235 which is 12.35)
>3rd column is a 8 digit number denoting the date (ie. 11092000)
>4th column is a one digit character which holds the flag (ie O = Out , I = In)
>Need to append a table with the following fields
>code ,c,10
>timein ,c,6
>timeout ,c, 6
>date ,c, 8
>if the flag equals O the data should go to timein
>if the flag equals I the data should go to timeout
>I have tried various techniques but no success.
>Any ideas?
>Thanking you in advance
>Regards
>Mike

Just a thought,

Create a table or temporary cursor with the structure of your text file.
Then append in that table form your text file with append from ... type ...
in the temporary table or cursor also create the fields timeout and timein.
now issue
Replace all timein with iif(myFlag ="I",mydate,""),;
  timeout with iif(myFlag="O",myDate,'')
Hope this helps you
Previous
Reply
Map
View

Click here to load this message in the networking platform