Thursday, March 5, 2015

Hash values are case sensitive

Using hash values is a good idea, but you should be aware this is case sensitive!:
SELECT HashBytes('MD5', 'http://')
      ,HashBytes('MD5', 'HTTP://')












To solve this problem you could upper all the values like this

SELECT HashBytes('MD5', UPPER('http://'))
      ,HashBytes('MD5', UPPER('HTTP://'))