substring

Returns the substring of "string_expression" that starts at position "integer_expression1". "Integer_expression2" specifies the number of characters in the substring.

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.