• GSquared -

    It's good (if not confusing) to know that this approach is solid. When you did it, did you use temporary table or table variables?

    I'm going to go back and try to double check I haven't made any other mistakes, but the query works just fine when the NOT EXISTS is removed. I'll also try re-writing the NOT EXISTS as an outer join.