symptom:
a query like:

	select HASHBYTES ('md5',  @value)
	
returns error message 8152, "String or binary data would be truncated."

HashBytes only accepts 8000 characters. For larger values, use:

	select master.sys.fn_repl_hash_binary(@value)

more info:
http://www.sqlnotes.info/2012/01/16/generate-md5-value-from-big-data/