• CROSS APPLY is an excellent tool for building complex WHERE clauses and would also help you to figure out if it's worthwhile building up an exclusion table as suggested. Once you've constructed your exclusions list in the CROSS APPLY block, you can drop it down into the WHERE clause.

    SELECT x.Exclusion, m.*

    FROM MyTable m

    CROSS APPLY (

    SELECT Exclusion = CASE

    WHEN m.SIZE = 10 AND m.COLOUR = 'R' AND m.PATTERNID IN (001,009) THEN 1

    WHEN m.SIZE = 10 AND m.COLOUR = 'G' AND m.PATTERNID IN (001,002,008) THEN 2

    ELSE NULL END

    ) x

    WHERE x.Exclusion IS NULL

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden