Hi,
Looking for a method of comparing rows in the same table, I ran across this thread. I thought I would add my 2p to the debate:
[Code="sql"]
SET @result = 0
IF EXISTS (SELECT EX.DocumentID FROM
(SELECT DocumentID, DocTitle, SortLetter, SortNumber FROM
PMProcessProcedures WHERE PMProcessID = @ID
EXCEPT
SELECT DocumentID, DocTitle, SortLetter, SortNumber FROM
PMProcessProcedures WHERE PMProcessID = @Approved) EX)
SET @result = 1[/code]
This will set @result if the two rows are different.
Hope this helps someone...