• Actually you can do nearly anything that can generate a true/false condition.. You often use () to set up which goes with which comparison..

    Try this:

    IF NOT EXISTS ( SELECT 'X' FROM dbo.SomeTable WHERE SomeField = SomeValue )

    AND NOT EXISTS ( SELECT 'X' FROM dbo.SomeOtherTable WHERE SomeField = SomeValue )

    BEGIN

    -- Do some work here that you want to do

    END

    Its a little pseudo codish but I think it shows what you are asking for..

    Or you can mix it up some..

    IF NOT EXISTS ( SELECT 'X' FROM dbo.SomeTable WHERE SomeField = SomeValue )

    AND @SomeVariable IS NOT NULL

    BEGIN

    -- Do some work here that you want to do

    END

    CEWII