MIN or MAX would have a much bigger implication on a bit column than on a date column, as there are just two values, and TRUE or FALSE is much more than a more-or-less random value for a set of rows.

There was a posting on that thread with an actual SQL error message when doing MAX on a bit column, so it seems as if it cannot be done.

Either you need the aggregate results with the bit column in the GROUP BY clause, or you don't need to include it at all. If you're only aggregating rows where the bit column is true (or false, for that matter) then include the column only in the HAVING or WHERE clause, and not in the SELECT or GROUP BY lists.

It's a table that holds flags indicating whether to perform a certain action. That is exactly what I want. I want to know if any row has a 1 on the bit column. I only don't perform the action if all of them are false... There are also multiple bit values (a lot of them) so it is better than doing separate queries.

Sorry for being a little obstinate - it is Friday after all.[<img src='/community/emoticons/emotion-5.gif' alt='' />]<br /><br />I just hate to see workarounds for non-issues. If you already know there are rows with BitColumn = 1, then why not simply return a 1 on that column, instead of MAX(CAST(....)).

I don't know if there are rows with BitColumn = 1. If the result comes back 0, then all of them were 0. If the result comes back as 1, then at least one of the rows had a 1. It's not a workaround at all...

I was reading your comment "I only don't perform the action if all of them are false... " - that's why I was assuming you already <b>knew</b> there would be at least one row where the bit was 1.[<img src='/community/emoticons/emotion-1.gif' alt='' />]