Given an email address column, I need to find the position of the @ sign for substringing.
What is the indexof function, for strings in T-SQL?
indexof
L
You can use either CHARINDEX or PATINDEX to return the starting position of the specified expression in a character string.
CHARINDEX('bar', 'foobar') == 4 PATINDEX('%bar%', 'foobar') == 4
Mind that you need to use the wildcards in PATINDEX on either side.