Groups | Blog | Home
all groups > sql server data mining > february 2005 >

sql server data mining : How do Ignore lowercase data in the where clause


Phillip
2/28/2005 7:34:23 AM
I have a table with values in a name field that are both lowercase and
uppercase. I want to select the records that only have uppercase names.
How do I do this?

I didn't see a sqlserver.query group so I figured this was the right
one.

Thanks,
Phil
Adam Machanic
2/28/2005 12:29:24 PM
You can use a binary collation designator to force case sensitivity, and a
pattern to search for only uppercase data:


SELECT *
FROM YourTable
WHERE Name NOT LIKE '%[a-z]%' COLLATE Latin1_General_BIN


By the way, check out the .programming group in the future for questions
like this.


--
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--


[quoted text, click to view]

AddThis Social Bookmark Button