• declare @a varchar(10)

    set @a = 'abcd a_b'

    select patindex('%[ _]%', @a)

    An alternative would be to use

    declare @a varchar(10)

    set @a = 'abcd a_b'

    select charindex('_', @a)

    I don't see a difference between the 2 functions. I posted this code as this is what I would have gone for first. Maybe someone can provide more info?