I have two types of transactions, one are "a" type transactions and the others are "A" type transactions. The "a" type transactions are the ones I want to select but I dont know how to select by case.
Double check that Tim's suggestion gives you the proper results.
LOWER - converts uppercase character data to lowercase.
So it converts what is in the parenthesis to lowercase. I.E. LOWER(Transaction) means all data in the Transaction column will be returned as LOWER case.
Let's say you have this in Transaction:
A
B
a
b
LOWER(Transaction) will return:
a
b
a
b
Try it:
SELECT LOWER(Transaction)
So, Tim's query should return EVERYTHING with either a lowercase a or an uppercase A.
WHERE Cast(Transaction as varbinary) = Cast('a' as varbinary)
select Cast('a' as varbinary), Cast('A' as varbinary)
produces the following result
0x61 0x41
"Shoot Me! Shoot Me NOW!!!"
- Daffy Duck
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.