Returns the starting position of the first occurrence of one string (search-string) within another string (source-string).
The first argument is the search-string. Can be a character-string or a graphic-string expression. Must be compatible with the source-string. The second argument is the source-string. May be a character-string or a graphic-string expression. The third argument specifies the starting position within the source-string. Must be a positive integer.
Example:
Select RECEIVED and SUBJECT columns as well as the starting position of the words 'GOOD' within the NOTE_TEXT column for all entries in the IN_TRAY table that contain these words.
SELECT RECEIVED, SUBJECT, LOCATE('GOOD', NOTE_TEXT) FROM IN_TRAY WHERE LOCATE('GOOD', NOTE_TEXT) <> 0