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)
 case sensitive

Author  Topic 

sks198117
Starting Member

46 Posts

Posted - 2009-07-23 : 23:37:18
i have a table in which a column has data in both lower and uper case like
col1
AAA
bbb
ccc
DDD
eee
i want to select the row with only lower case like
result shud be
bbb
ccc
eee
Please help

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-23 : 23:59:01
what is your collation is it case sensitive ?

is your data either in all UPPER or all lower or you have mix like 'AaA' or 'bBb' ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

sks198117
Starting Member

46 Posts

Posted - 2009-07-24 : 00:00:41
its either in lower or in upper like aaaa or BBBB
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-24 : 00:12:54
where column = lower(column)


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

sks198117
Starting Member

46 Posts

Posted - 2009-07-24 : 00:42:31
thanks but its does not work. :(
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-24 : 00:47:45
your collation case in-sensitive ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

sks198117
Starting Member

46 Posts

Posted - 2009-07-24 : 00:52:23
yes
Go to Top of Page

sks198117
Starting Member

46 Posts

Posted - 2009-07-24 : 02:37:16
Thanks but i got answer

SELECT *
FROM table where col=lower(col) Collate SQL_Latin1_General_CP1_CS_AS
Go to Top of Page
   

- Advertisement -