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