LOCATE function
The LOCATE function returns a large integer indicating the position of one string, searchString, in another, sourceString. The function returns 0 if searchString is a zero-length string or is not found, or if start is greater than the length of sourceString. By default, the search starts at the first character of the receiving string (that is, the value of start is 1), and continues to the end of the string.
The arguments are defined as follows:
searchString | searchString is an expression that specifies the string for which you are searching. searchString must return a value that is a built-in single-byte character/varying string data type. |
sourceString | sourceString must return a value that is a built-in single-byte character/varying string data type. |
start | start is an expression that specifies the position within the searchString where the search is to start. start is expressed in bytes and must return an integer value that is greater than or equal to 1. |