Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Where any character in a field has 1 or more lower

Author  Topic 

fezz
Starting Member

12 Posts

Posted - 2010-07-28 : 12:10:53
I'm trying to write a query that looks for any lower case characters in a field. Can anyone help?

So far i've got something like this

select * from tablea where fielda like lower('%[a-z]%')

Pete

Kristen
Test

22859 Posts

Posted - 2010-07-28 : 12:22:16
You want only rows that contain a lower case letter in [fielda]?

presumably the field collation is case INsensitive ...

select * from tablea where fielda like '%[a-z]%' COLLATE Latin1_General_BIN2

or perhaps


select * from tablea where fielda <> UCase(fielda) COLLATE Latin1_General_BIN2
Go to Top of Page
   

- Advertisement -