A
1.
1 LTRIM (character_expression)-- Delete the starting space in the character variable 2 RTRIM ( character_expression)-- Delete trailing spaces in the character variable
2. Gets the start position of the returned start of the specified string. Return position starting from 1, not starting from 0
1 CHARINDEX (expression1, expression2 [ , Start_location ] )
(ii) SUBSTRING (expression, start, length) parameter expression is a string, a binary string, a text, an image, a column, or a containing column. Do not use an expression that contains an aggregate function. Start is an integer that specifies the starting position of the substring. Length is an integer that specifies the length of the substring (the number of characters or bytes to return). SELECT x = SUBSTRING ('abcdef', 2, 3) Here is the result set: X----------BCD
SQL Server Basics