This UDF will return the checksum for a SP or UDF to help tracking changes to the code.
Example:
print dbo.OBchecksum('hello')
2007-10-02 (first published: 2002-06-20)
15,452 reads
This UDF will return the checksum for a SP or UDF to help tracking changes to the code.
Example:
print dbo.OBchecksum('hello')
CREATE function OBchecksum(@s NVARCHAR(128) ) returns int as BEGIN declare @i int set @i=( SELECT CHECKSUM_AGG (CHECKSUM(dbo.syscomments.text)) AS Expr1 FROM dbo.syscomments INNER JOIN dbo.sysobjects ON dbo.syscomments.id = dbo.sysobjects.id WHERE (dbo.sysobjects.name =@s) ) return @i END