Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Equivalent to ALLTRIM(UPPER())
Message
 
To
16/06/2008 10:14:09
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01324396
Message ID:
01324453
Views:
11
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform