Try
where FirstName LIKE 'S[_]SH%' ([ are the escape characters)
Also, in SQL Server most installations are case insensitive, so using UPPER function makes your query non sargable. If you want to be 100% sure it will work you can use COLLATE keyword to use non case-sensitive collation.
So, essentially, you can replace _ with [_] when you create your string to check.
See also
http://msdn.microsoft.com/en-us/library/ms187489.aspxand there Searching for Wildcard Characters
>I just discoverd something I was not aware. The _ character is used as a filtering character, such as a wild card, when doing a query. The following:
>
>
>DECLARE @LXListFirstName Varchar(16)
>
>SET @LXListFirstName='S_SH%'
>
>SELECT Member.Numero
> FROM Member
> WHERE UPPER(Member.FirstName) LIKE @LXListFirstName
> ORDER BY Member.LastName,Member.FirstName
>
>
>...will find all records having S as the first character and SH for the 3rd and 4th character no matter what is the second letter. So, it found results such as:
>
>Sushil
>Sasha
>Sushma
>Sushell
>Sushi
>
>How can I turn that OFF? Basically, I really needed to find S_Sh as is and not all those records.
If it's not broken, fix it until it is.
My Blog