CREATE PROCEDURE HashObject(@id int, @SomeField varchar(255)) AS
BEGIN
SELECT
CHECKSUM(@id, @SomeField) AS CalculatedHashValue,
(SELECT @id AS ID, @SomeField AS SomeField FOR XML RAW('xmlRowName')) AS Xml_Data,
@id AS SPCall_ID,
@SomeField AS SPCall_SomeField
CREATE PROCEDURE CheckHash(@HashValue INT, @data XML) AS
BEGIN
SELECT
CHECKSUM(rt.value('@ID', 'int'), rt.value('@SomeField', 'varchar(255)')) AS Xml_CalculatedHashValue,
@data Xml_Data,
rt.value('@ID', 'int') AS Xml_ID,
rt.value('@SomeField', 'varchar(255)') AS Xml_SomeField,
@HashValue AS SPCall_HashValue
FROM @data.nodes('xmlRowName') AS nd(rt)
DECLARE @id INT = 11
DECLARE @SomeField varchar(255) = 'string value'
DECLARE @data XML
EXEC dbo.HashObject @id, @SomeField