I have a MySQL database called arch, with a table called resources, which has a text field called title. I'm working on normalizing the title field; sometimes it ends with a period, sometimes it doesn't. I'd like to remove all trailing periods. I'm afraid of using the replace function because the title field does contain valid periods within the data.
I've tried using
SELECT TRIM(TRAILING '.' FROM 'title')
but am not having luck. I think this must be simple. Shouldn't this be possible within MySQL?
EDIT:
I read elsewhere that TRIM() does not work on SELECT function. I rewrote the statement into
UPDATE resources SET title = TRIM(TRAILING '.' FROM title)
and success!
Thanks all for the help.