SQL Server/T-SQL/String Functions/PATINDEX
PATINDEX("%M_rs%", "The stars near Mars are far from ours")
1>
2> SELECT PATINDEX("%M_rs%", "The stars near Mars are far from ours")
3> GO
-----------
16
(1 rows affected)
1>
PATINDEX: searchs for a pattern of characters within a string
1> --PATINDEX: searchs for a pattern of characters within a string.
2> -- return 0 if no match is found.
3>
4> SELECT PATINDEX("%SQL%","SQL server sql server")
5>
6> GO
-----------
1
(1 rows affected)
1>