how to find a char and take index from it in sql code example Example: locate sql server SELECT CHARINDEX('b','ab') //returns 2