Remove Dot at end of line of the string in SQLserver I would to like to remove the dot at end of the line alone if exists in the string in SQL server.

Example:  

ABC Private's co., ltd. 


Required output:  

ABC Private's co., ltd
You can use like to check for a . at the end of the string.

declare @S nvarchar(max) = 'ABC Private''s co., ltd.';

select case when @S like '%.' 
         then left(@S, len(@S) - 1) 
         else @S 
       end;