Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the best way to delimited the field with 2 delimi
Message
From
23/10/1997 10:25:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00054748
Message ID:
00056332
Views:
37
>>>But the CHRTRAN() only take an expression. The first time I delimited the >fields from the text file, I store it into database field. The fields now >contain ~blah~~blah~.. if I use CHRTRAN() I had to hard code all the >expression. How can I make it dynamic!! >>> >>>> >>>>You better open text file with low-level functions, assign all file >contetns to string variable, use CHRTRAN() to replace extra delimiter, save >string into new txt file, and now you can run APPEND FROM safely. >> >>Hi, >>This could be wrong for I couldn't see the original question. >>You could use strtran instead of chrtran. >>cOutString = strtarn(strtran(cInString, "[[","["),"]]","]"). >>Cetin > >Have you tried taking the text file into Word and Replace all ~ with |? >The new file should import fine. create cursor mm (m m) appe blank appe memo m from (the_file) * replace all delimiters with just one delimiter replace m with chrt(m, "[]","|") * replace double delimiters with single repl m with strt(m, '||','|') * write the file back copy memo m to (the_file) use Should be far faster than calling Word. Backup (the_file) first.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform