Steve,
I tired this last night and did not work.
Now I tried it again and bang, perfect.
After I started believing I'm an idiot, I query again from the server and out of that I query again to filter what I need with the
… padr(ALLTRIM(FIRST)+' '+ALLTRIM(MIDDLE)+'. '+ALLTRIM(LAST),40) AS NAME,….
and there it was, same thing, all the trailing spaces.
what the heck am I'm I doing wrong?
>Edgar,
>
>Use padr() to set the length you want. You could alltrim the entire result, but each name would be truncated to the length of the first returned record.
>
>
>… padr(ALLTRIM(FIRST)+' '+ALLTRIM(MIDDLE)+'. '+ALLTRIM(LAST),40) AS NAME,….
>
>
>Although I would not expect the behaviour you are having...I would expect your code to set the width to be the width of the first record, all trimmed.
>
>>good morning to all!
>>
>>I don’t know if I did not notice or did not bother me before, but when I SELECT from SQL server as :
>>…ALLTRIM(FIRST)+' '+ALLT(MIDDLE)+'. '+ALLTRIM(LAST)AS NAME,….
>>the field is returned with all the trailing spaces from the original length of the field which is 153 char long. (I can’t imagine anybody having such long last name…let along pronounce it)
>>So everytime I want to see the next field in the cursor I have to scroll to the right.
>>What is the best way to bring only the name without the trailing spaces?