trim is not working for few string
I looked at the trim function and it removes the character from the beginning or the end of the string.  I'd bet that the two where it's not working have spaces after the ".".  Try trimming spaces off the end first then trim the "."

select trim(trim(value,' '), '.') from mytable