SUBSTR() returns a portion of an input string, from the start position in the string to the specified length. If a length is not specified, SUBSTR() returns all the characters from the start position to the end of the string.
SUBSTR(string, start [, length])SUBSTR() returns a character string
SUBSTR("APPLES AND ORANGES", 1, 6)   = "APPLES"
SUBSTR("APPLES AND ORANGES", 8, 3)   = "AND"
SUBSTR("APPLES AND ORANGES", 12)     = "ORANGES"