See Also: | CHR | INSTR | NEW_TIME | NVL | SUBSTR | SYS_EXTRACT_UTC | SYSDATE | SYSTIMESTAMP | TO_DATE | TO_NUMBER |
---|
The INSTR function returns an integer value representing the starting position of a string within the search string.
This function is only available when the CREATE ENVIRONMENT statement contains the SQL_SYNTAX ORACLE clause or the SET SQL_SYNTAX ORACLE setting is set programmatically.
Syntax: INSTR(target_string, search_string[, start_position[, occurrence]])
Target_string is a character expression of either a column_spec or a collection of functions that return a string.
Search_string is a character expression of either a column_spec or a collection of functions that return a string.
Start_position is an optional integer expression that indicates that the all characters previous to the start_position should be ignored.
Occurrence is an optional integer expression that indicates to return character position of the nth occurrence of the search_string.
select instr('12345','3') from $omnidex;
Returns a value of 3
select instr('1234512345','3',4) from $omnidex;
Returns a value of 8.
select instr('1234512345','3',1,2) from $omnidex;
Returns a value of 8.