SUBSTRING will return part of the original string based on the expressions.
SUBSTRING (value_expression, start_expression, length_expression)
Example code,
SELECT x = SUBSTRING(‘ABCDEFGHIJ’, 3, 5);
The returned result is “CDEFG”. It will start a index ’3′ and with length ’5′ characters.
Tags: Transact-SQL