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