I want to aggregate a single HASHBYTES() from the results of another HASHBYTES()... something like CHECKSUM_AGG() does for CHECKSUM()...
I have been able find how to make a single HASH per row of columns from a table:
SELECT
hashbytes('MD5', (
SELECT SPECIFIC_SCHEMA
,SPECIFIC_NAME
,ROUTINE_SCHEMA
,ROUTINE_NAME
,ROUTINE_TYPE
,ROUTINE_DEFINITION
FROM (
VALUES (NULL)
) foo(bar)
FOR XML auto
)) AS [Hash]
FROM INFORMATION_SCHEMA.ROUTINES AS MBT;
How do I aggregate to a single hash from all the hash rows returned?
(Yes, I want to reduce a table to a single hash for comparison to table(s) in other databases).