select PATINDEX('%v_r%', 'SQL Server') : PATINDEX « String Functions « SQL Server / T-SQL Tutorial






2>
3> select PATINDEX('%v_r%', 'SQL Server')
4> GO

-----------
          8

(1 rows affected)








12.11.PATINDEX
12.11.1.PATINDEX searches for a pattern of characters within a string.
12.11.2.SELECT PATINDEX('%M_rs%', 'The stars near Mars are far from ours')
12.11.3.select PATINDEX('%v_r%', 'SQL Server')
12.11.4.WHERE PATINDEX('%computer[^s]%', notes) > 0
12.11.5.Finding the Start Position of a String Within Another String Using Wildcards