Randy,
One 'gotcha', if you will, is that if you ever run into a situation where someone embeds a TAB the RTRIM, LTRIM or ALLTRIM command will
not remove the TAB character.
Try the following:
x=space(1)+chr(9)+space(1)+"Hello"+space(1)+chr(9)+space(1)
y=alltrim(x)
?asc(right(y,1))
? len(y) = 9
You will get a 9 returned, which is the length up to both TAB characters. In the example above you would still have white space characters in your variable both before and after the actual information, should you only want "hello".
Sometimes users can really goof up our best laid plans. <g>
I've had, on occassion, to write a routine that 'scrubs' TABS off of variables.
>>I'm not sure I understand.
>>
>>Will LEN(RTRIM(field)) work for you? Are you looking for the length without trailing spaces?
>>
>>--Brad
>
>That will do it. Thanks
Best,
DD
A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.