>>>Is there one?
>>
>>ltrim(rtrim(upper()))
>
>So, if @Filename = "123456.tiff" then this should evaluate to true:
>
>UPPER(@Filename) LIKE '%.TIFF%'
>
>
>Mine does not for some reason.
There is no need, to UPPER, just use case-insensitive collation in LIKE:
WHERE @FileName COLLATE Latin1_General_CI_AI
LIKE '%.TIFF%' COLLATE Latin1_General_CI_AI
And if the @FileName is varchar there is no need to TRIM it.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.