>Is there a quick way to remove blanks within a field? For example PART NUMBER = 'TRG 011 4TGH 77K' to become 'TRG0114TGH77K'
>Thanks.
Hi Timothy,
Everyone's told you that using STRTRAN() is the solution to your problem, and, of course, they're right. I thought I'd give you another, related piece of advice about the function. I can't recommend your using a literal string here. It can make it hard to read. I'd suggest using either:
lcnewstring = STRTRAN(yourstring, SPACE(1), "")
or
lcreplace = SPACE(1)
lcnewstring = STRTRAN(yourstring, lcreplace, "")
It's much more readable, and, therefore, maintainable.
BTW, the third parameter isn't necessary. If it's eliminated STRTRAN() replaces the specified character with a "" anyway.
hth,
George
Ubi caritas et amor, deus ibi est