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
 Compare string small and cap alphbates

Author  Topic 

pushp82
Yak Posting Veteran

83 Posts

Posted - 2012-07-23 : 02:26:08
Hi,

How can I compare two string in t-sql like :
@string1='W79GnbSAFm2rDYOR'
@string2='w79gNBsaFm2rDYOr'
I need to compare caps and small alphabets. Can I use
BINARY_CHECKSUM
CHECKSUM
Or any other solution like ASCII value comparison?

Please help ASAP.
Pushp

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-07-23 : 02:38:21
see here:
http://vyaskn.tripod.com/case_sensitive_search_in_sql_server.htm


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

pushp82
Yak Posting Veteran

83 Posts

Posted - 2012-07-23 : 03:01:02
thanks for being helpfull

quote:
Originally posted by webfred

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


No, you're never too old to Yak'n'Roll if you're too young to die.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-23 : 10:26:45
i usually use case sensitive collation for doing comparisons like this

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

pushp82
Yak Posting Veteran

83 Posts

Posted - 2012-07-24 : 05:36:56
I used varbinary comparision

quote:
Originally posted by visakh16

i usually use case sensitive collation for doing comparisons like this

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page
   

- Advertisement -