Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd string replacement: STRTRAN but with embedded spaces
Message
From
14/11/2006 11:12:45
 
 
To
14/11/2006 11:05:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01169359
Message ID:
01169509
Views:
8
Thomas --

Yeah, I agree there's no need for optimization here. Only 2,500 records, once an hour (background).

I'm not concerned about other special characters. This is almost always a case of user input where they were sloppy (being redundant here!) about entering the UPC code with spaces in exactly the correct positions.

>>Thomas --
>>
>>Unfortunately, your unspoken assumption doesn't fit my case. This processing actually occurs during a background job, so there is no human intervention possible. Furthermore, there's no date field in the source file that allows me to know which records may have changed, so I must re-process the entire file each time (hourly, as it turns out).
>
>If John's approach works for all your cases and is speedy enough (hourly run...) ok. Depending on other assumptions like
>possible insert chars: only spaces or perhaps tabs and other special chars as well
>all chars/zeroes put into the meshed fields
>
>perhaps a faster approach could be found "jumping" from the left or from the right. But optimization now would be premature.
>
>regards
>
>thomas
Jim Nelson
Newbury Park, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform