• Wrap your conditions in parenthesis and add an OR

    CREATE TABLE CheckConstraintTest

    (

    CTId INT NOT NULL ,

    Goal INT NULL ,

    CONSTRAINT CK_CheckConstraintTest_Goal CHECK (

    (CTId = 1 AND Goal IS NOT NULL )

    OR

    (CTId <> 1)

    )

    );

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg