SoftadminUtil.String_CountOccurrences

Type: Scalar function

This function is used to find the number of non-overlapping occurrences of a substring withing a larger body of text.

Return value: int

The number of non-overlapping occurrences found.

Parameters

@Text mandatory nvarchar(max)
The larger body of text.
@Substring mandatory nvarchar(max)
The substring to find in the larger body of text.