SQL Server SUBSTRING - MSSQLTips
Keep in mind every character counts when using the substring functions, this also includes white space and non-printable characters. To clean up your text, you can use the LTRIM, RTRIM or TRIM functions. The TRIM function (introduced in SQL Server 2017) is a bit more versatile because it removes from both ends of the string at once, but it can also remove other characters than spaces.
DA: 47 PA: 72 MOZ Rank: 11