SQL SERVER function to find char in string code example Example: locate sql server SELECT CHARINDEX('b','ab') //returns 2