Skip to main content
added 216 characters in body
Source Link

Have similar problem with HASHBYTES. Same values from one "varchar(max)" column generate up to 3 differentmultiple hash values. SQL Server 2017 (RTM-CU19) (KB4535007) - 14.0

The problem is caused by capitalization and Case Insensitive collation.3281 Because of that my values were actually different.6 (X64)

If you do not care about case sensitivity you can change your values to upper case to mitigate that problem:

SELECT hashbytes('SHA2_512',UPPER('Hello World'))
UNION 
SELECT hashbytes('SHA2_512',UPPER('Hello world'))

Have similar problem with HASHBYTES. Same values from one "varchar(max)" column generate up to 3 different hash values. SQL Server 2017 (RTM-CU19) (KB4535007) - 14.0.3281.6 (X64)

Have similar problem with HASHBYTES. Same values from one "varchar(max)" column generate multiple hash values.

The problem is caused by capitalization and Case Insensitive collation. Because of that my values were actually different.

If you do not care about case sensitivity you can change your values to upper case to mitigate that problem:

SELECT hashbytes('SHA2_512',UPPER('Hello World'))
UNION 
SELECT hashbytes('SHA2_512',UPPER('Hello world'))
Source Link

Have similar problem with HASHBYTES. Same values from one "varchar(max)" column generate up to 3 different hash values. SQL Server 2017 (RTM-CU19) (KB4535007) - 14.0.3281.6 (X64)