SUBSTR
Syntax
<substr-expression> := 'SUBSTR(' <String> ',' <Integer> ',' <Integer> ')'
Since
2.0
Return-type
String
Description
The function SUBSTR returns a new string that is a substring of the string passed as first argument. The substring begins with the character at index specified by the second argument and extends to the character at the index defined by the third argument - 1. Thus the length of the substring is end Index - begin Index. If any of the arguments is NULL, the function returns NULL.
Examples
SUBSTR( 'Hello World', 0, 5 )
= 'Hello'
SUBSTR( NULL, 1, 5 )
= NULL
See also
LEFT, RIGHT, STRLEN, SUBSTRINGBEHIND
