In this article I am going to explain sql server TRIM function.
In previous article I have explained sql server reverse function, how to createchart using Google chart API in MVC and how to create multiselect dropdown withcheckbox using Bootstrap multiselect Jquery plugin.
Trim function is used to remove blank spaces from string. You can use the RTRIM to remove the right side (end) blank space and LTRIM to remove left side (beginning) of string.
Truncate Right side:
select RTRIM(' Articlemirror ') as 'Truncate Right side'
Truncate Left side:
select LTRIM(' Articlemirror ') as 'Truncate Left side'
Truncate Left and right side:
select RTRIM(LTRIM(' Articlemirror ')) as 'Truncate both side'
What do you think about this article?
If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.