boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

Trim Unnecessary Space from the string in SQL Server

Updated on     Kisan Patel

This tutorial will show you how to trim unnecessary space from the string in SQL Server?

To trim unnecessary blank spaces from the string in SQL Server, we use LTRIM or RTRIM functions.

  • LTRIM – removes the left side spaces, if any
  • RTRIM – removes the right side spaces, if any

Note: To remove all spaces, we can use both LTRIM and RTRIM functions.

DECLARE @myName varchar(50)
SET @myName = 'https://csharpcode.org/'
SELECT @myName
SELECT LTRIM(@myName), RTRIM(@myName), LTRIM(RTRIM(@myName))

Notice the output of above code snippet below.

con1

In first case, the output is coming along with left side and right side blank space.

In the 2nd result set−

  • The first column value is after removing all left side spaces from the string
  • The second column value is after removing all right side spaces from the string
  • The third column removes spaces from right side and then left side and gives the actual string without any blank space either side.

SQL Server

Leave a Reply