INDEX function returns the position (integer number) of a substring in a string.
Quick Example:
Find position of word York in string New York:
SELECT INDEX('New York', 'York'); -- Result: 5
Summary information:
Related Functions:
POSITION | Get Position of Substring in String | ANSI SQL compliant | Different order of parameters |
Last Update: Teradata 13.0
Defining the position of a substring in other databases:
Oracle:
INSTR(string, substring [,position [, occurrence]]) | Allows specifying the start position for search and occurrence |