sqlcharactertrim

SQL Server TRIM character


I have the following string: 'BOB*', how do I trim the * so it shows up as 'BOB'

I tried the RTRIM('BOB*','*') but does not work as says needs only 1 parameter.


Solution

  • LEFT('BOB*', LEN('BOB*')-1)
    

    should do it.