Problem Statement :
This article explains how to find the starting index of the first occurrence of a pattern in a string or a specified expression using PATINDEX() function in SQL server.
- It returns zero if the pattern is not found.
- It returns Null if either pattern or expression is NULL.
Code Snippet:
Select [Name],[GroupName], PATINDEX( ‘% and %’ ,[GroupName]) as startingStartingPoint
FROM [AdventureWorks].[HumanResources].[Department]