substring

Returns the substring of "string_expression" that starts at position "integer_expression1" for "integer_expression2" characters. The first character in "string_expression" is at position 1.

Syntax

substring ( string_expression , integer_expression1 ,
 integer_expression2 )

Example

substring ( [Sales (query)].[Sales staff].[Position code], 3 , 5 )

Result

Returns characters 3 to 7 of the position codes.