• Greetings,

    If your concern is to not run all of the checks, then you can modify the IF statements as such:

    IF EXISTS(SELECT * FROM MyTable WHERE Checks2 = true) AND @ChecksFlag = 0

    BEGIN

    SET @ChecksFlag = 1

    END

    Another option may be to set @ChecksFlag to a value between 1 and 3 to show which check it was validated against if you needed or wanted to know.

    Have a good day.

    Terry Steadman