SQL Server 2000
xp_MD5 at http://www.codeproject.com/database/xp_md5.asp
Also works in SQL Server 2005 32 bit
SQL Server 2005
DECLARE @Data varchar(MAX) SubString(master.dbo.fn_varbintohexstr(HashBytes('MD5', @Data)), 3, 32)
Works in SQL Server 2005 32 and 64 bit
Solution found at http://www.codeproject.com/database/xp_md5.asp?df=100&forumid=32460&select=1519990#xx1519990xx