T-SQL 101: #44 Trimming whitespace from strings in SQL Server

added by DotNetKicks
11/18/2019 5:01:46 PM

619 Views

I often need to remove spaces from the front or back (or both) of strings. For a long time, the two functions we had for that were LTRIM (for left trim) and RTRIM (for right trim). You can see them in the first two SELECT statements here: For as long as I've used SQL Server ...


0 comments