• IF LEN(@string) - LEN(REPLACE(@string, '*', '')) >= 2

    BEGIN

    RETURN LEN(@string) - CHARINDEX('*', REVERSE(@string)) + 1

    END