Stripping Spaces from Right Hand Side

T

Tim Childs

Hi

I have tables of data from a financial system where the non-numeric raw data
is filled with spaces when supplied to me. I am using a loop to test each
cell for these "filler spaces" on the right hand end of each cell and then
applying RTRIM to get the valid text.

Is there a shortcut alternative to using the looping - it seems quite slow

Thanks

Tim
 
R

RB Smissaert

1. Can your SQL handle that right-trim? Might be faster.
2. Do a right trim without testing first.
3. Put the whole range in an array and do the right-trimming on the array
elements then put back in the range.
4. Use RTrim$ instead of RTrim as it is up to twice as fast.

RBS
 
T

Tim Childs

Hi

Many thanks for those suggestions

Out of interest, can you say why in "4." RTrim$ is so much quicker?

Best wishes

Tim
 
Top