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
 General SQL Server Forums
 New to SQL Server Programming
 Collation for finding difference in lower/uppercas

Author  Topic 

Robowski
Posting Yak Master

101 Posts

Posted - 2013-04-17 : 07:27:56
Just more of a general question really,

when ever I need to compare a field for a a difference in character case I.e if someone has entered something into table.column in lower case when it should have been upper I convert to varbinary

But I vaguely remember reading something about you can change the collation of the string to also find this out?

Anyone know/does this make sense?

Cheers

Robbo

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-04-17 : 07:45:54
SELECT Column1
FROM Table1
WHERE Column1 COLLATE Latin1_General_CS_AS = 'casesearch'

Refer
http://blog.sqlauthority.com/2007/04/30/case-sensitive-sql-query-search/
http://msdn.microsoft.com/en-in/library/ms144250(v=sql.105).aspx

--
Chandu
Go to Top of Page

Robowski
Posting Yak Master

101 Posts

Posted - 2013-04-17 : 08:45:55
thanks for the info, always good to know other ways!
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-04-18 : 02:35:03
quote:
Originally posted by Robowski

thanks for the info, always good to know other ways!


Welcome

--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-18 : 03:10:51
you can also have other approaches like this

http://vyaskn.tripod.com/case_sensitive_search_in_sql_server.htm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -