SQLUSA

Microsoft SQL Server 2000 Best Practices

 

How to eliminate trailing spaces in a column with RTRIM?

 

The following script updates a column where the cell has trailing spaces:

 

update TableX set ColumnA = RTRIM(ColumnA) where len(ColumnA) > 0 and right(ColumnA,1) = ' '

 

American Standard in SQL Server Training
 
SQLUSA.com Home Page