PATINDEX_UDF
Definition
This user-defined function (UDF) returns the starting position of the first occurrence of a pattern in a specified expression or zeros if the pattern is not found.
Parameters
PATTERN
VARCHAR
The pattern to search for.
EXPRESSION
VARCHAR
The expression that is being evaluated.
Returns
Returns an integer with the starting position of the pattern.
Usage example
Input:
Output:
Last updated