sql server string return position of character code example Example: locate sql server SELECT CHARINDEX('b','ab') //returns 2