• Say it ain't so. This is the first I've heard a set based solution losing to RBAR.

    I don't have the desire to check right now, but what about using a CTE instead for the tally table?

    aktikt