• Sean Lange (1/8/2014)


    sharonsql2013 (1/8/2014)


    Yes so I am counting RoundTables in ('1', N/A') AND IsVideo in ('1', 'N/A').

    and then need to do an and between these to counts.

    Should I separately count and then add ?

    Wouldn't changing the AND to OR solve the issue?

    I reckon Sean's nailed it here. Try running this, it will tell you:

    SELECT

    Roundtables,

    IsVideo,

    COUNT(*)

    FROM CTE1

    WHERE Cte1.Roundtables IN ('1', 'N/A')

    OR IsVideo IN ('1', 'N/A')

    GROUP BY Roundtables, IsVideo


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]