SQLSERVER CHARINDEX code example
Example 1: locate sql server
SELECT CHARINDEX('b','ab') //returns 2
Example 2: charindex sql server
DECLARE @document VARCHAR(64);
SELECT @document = 'Reflectors are vital safety' +
' components of your bicycle.';
SELECT CHARINDEX('bicycle', @document);
GO