Home Forums SQL Server 2005 SQL Server 2005 General Discussion HashBytes Function - Change varbinary output RE: HashBytes Function - Change varbinary output
Lee Fisher
SSC Veteran
Points: 290
More actions
February 24, 2008 at 8:55 am
#781424
There is an undocumented function that will help
DECLARE @HashThis varchar(255);
SELECT @HashThis = 'Hello world!'
SELECT HashBytes('MD5', @HashThis)
SELECT SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', @HashThis)), 3, 32)