• Oh and by the way, this line has to be what replaced the top clause correct?

    where v.RowNum <= r.UnitCount