Returns a substring of a string.
The first argument is the base string. The second argument must be an integer expression and specifies the start position for the substring. The third argument is optional. If specified, it must be an integer expression indicating the length.
Example:
Assume column NAME has a value of 'KATIE AUSTIN' and column SURNAME_POS (int) has a value of 7.
SUBSTR(NAME, SURNAME_POS)
Returns the value 'AUSTIN'
SUBSTR(NAME, SURNAME_POS, 1)
Returns the value 'A'.