title: SQL Server : RTRIM not working to remove empty spaces
body: <p>One of the column values in my tables have empty space at the end of each string.</p>
  
  <p>In my select query, I am trying to trim the empty space at the end of string but the value is not getting trimmed.</p>
  
  <pre><code>SELECT
      EmpId, RTRIM(Designation) AS Designation, City 
  FROM
      tblEmployee
  </code></pre>
  
  <p>This is not trimming the empty space, not just this even the <code>LTRIM(RTRIM(Designation) AS Designation</code> is not working.</p>
  
  <p>I also tried </p>
  
  <pre><code>CONVERT(VARCHAR(56), LTRIM(RTRIM(Designation))) AS [Designation]
  </code></pre>
  
  <p>Nothing is trimming the empty space at the end of the string...</p>
  
  <p>Any help appreciated</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks to suggestions in the comments, I checked what the last value was in the column using <code>ASCII()</code>. It is <code>160</code> is a <a href="https://stackoverflow.com/a/2132372/6167855">non-breaking space</a>.</p>
  
  <p>How can I remove this non-breaking space?</p>