INSTR_UDF (STRING, STRING)

This is the user-defined function (UDF) overloaded with two parameters.

Definition

Searches the source_string argument for occurrences of searh_string.

PUBLIC.INSTR_UDF(SOURCE_STRING STRING, SEARCH_STRING STRING) 

Parameters

SOURCE_STRING STRING

The string where the search will be conducted.

SEARCH_STRING STRING

The string that the function searches for.

Returns

The position in the source string where the occurrence is found (starting at 1).

Usage example

Input:

SELECT INSTR_UDF('INSTR FUNCTION','N');

Output:

2