SUBSTRING function (ODBC compatible)
Syntax
SUBSTRING ( char_expression, start_position [, length ] )
Description
The scalar function SUBSTRING returns the substring of the character string corresponding to the first argument starting at start_position and length characters long. If the third argument, length, is not specified, the substring starting at start_position up to the end of char_expression is returned. SUBSTRING is identical to SUBSTR and provides ODBC-compatible syntax.
Example
SELECT name, '(', SUBSTRING (phone, 1, 3) , ')',
SUBSTRING (phone, 4, 3), '-',
SUBSTRING (phone, 7, 4)
FROM customer ;
Notes