SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Compare string small and cap alphbates
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pushp82
Yak Posting Veteran

67 Posts

Posted - 07/23/2012 :  02:26:08  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

Germany
8513 Posts

Posted - 07/23/2012 :  02:38:21  Show Profile  Visit webfred's Homepage  Reply with Quote
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

67 Posts

Posted - 07/23/2012 :  03:01:02  Show Profile  Reply with Quote
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

India
47023 Posts

Posted - 07/23/2012 :  10:26:45  Show Profile  Reply with Quote
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

67 Posts

Posted - 07/24/2012 :  05:36:56  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000