Returns the number of occurrences of a string found within another string. Overlapping matches are not included.
Format
STR_FIND_COUNT (Base String, Search String)
Base String | Text string. |
Search String | Text string. |
Examples
The following examples illustrate the use of the STR_FIND_COUNT function:
Function | STR_FIND_COUNT("hammer stammer", "mm") |
Result | 2 |
Function | STR_FIND_COUNT("hellllo jello", "ll") |
Result | 3 |
The following function returns 2 because the overlapping, matching 9's from 239990 to 129990 are not included:
Function | STR_FIND_COUNT("239990 129990", "99") |
Result | 2 |