title: Trimming text strings in SQL Server 2008
body: <p>I have a table in a SQL Server 2008 database. This table has a nvarchar(256) column called 'Name'. Unfortunately, the values in this field have extra spaces included. For instance the name 'Bill' is actually stored as 'Bill                       ' in the table. </p>
  
  <p>I want to update all of the records in this table to remove the extra spaces. However, I was surprised to learn that SQL does not have a TRIM function. </p>
  
  <p>How do I update all of the records at once to remove the extra spaces?</p>
  
  <p>Thank you!</p>