>Try
>
>where FirstName LIKE 'S[_]SH%' ([ are the escape characters)
I tried it and it worked. So, basically, in order to avoid that, for SQL Server, I should parse a criteria entered by the user and simply encapsulate it between those [] 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.
Yes, the UPPER() is there to support various backends. I was not aware it was causing a downsize. Is it? You mentioned "non sargable". Is it something that can slow down the query once in a while? If yes, than I should call a method to adjust to have UPPER or not base on the backend.