1.

What Is Patindex?

Answer»

Returns the STARTING position of the first OCCURRENCE of a PATTERN in a SPECIFIED expression, or zeros if the pattern is not found.
Syntax - PATINDEX ( '%pattern%' , expression )
Eg: USE AdventureWorks;

USE AdventureWorks; GO SELECT PATINDEX('%ensure%', DocumentSummary) FROM Production.Document WHERE DocumentID = 3; GO

Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found.
Syntax - PATINDEX ( '%pattern%' , expression )
Eg: USE AdventureWorks;



Discussion

No Comment Found