Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello - I'm trying to trim trailing spaces in a field where it contains ID:
Load:
trim([ID])
Value:
70138000000jzWsADM
for example the above has a space at the end and after the load, the space still exists!
Any help would be greatly appreciated - thank you!
-Jason
This was really close! I used =Ord(Right([ID],1)) and found out the chr was 160 instead of 32 and used
PurgeChar(ID,Chr(160)) as ID
Thanks again Sunny for the speedy response!
-Jason
Jason,
Try,
Replace(ID,' ','')
OR
PurgeChar(ID, chr(32) )
What about this:
LOAD
PurgeChar(ID, ' '&Chr(32)) as ID
Tried and didn't work - I found out a method in another thread to look for the chr of the space and it is actually a non-breaking space chr160 - so a purgechar worked instead.
Thanks Tamil!
This was really close! I used =Ord(Right([ID],1)) and found out the chr was 160 instead of 32 and used
PurgeChar(ID,Chr(160)) as ID
Thanks again Sunny for the speedy response!
-Jason
Awesome, that was a smart way to determine what the CHR was. I am going to keep that in mind for the future.
If you got what you wanted, please close this thread by marking your answer as correct and any other helpful responses.
Best,
Sunny
Thanks for the reminder! Just marked as correct.
Glad you found the solution. Usually trim removes any leading and trailing spaces. I suspect something was there other than space and causing the problem. But I didn't thought about the non breaking space at the time.