• Hi

    I think There is much better solution (very simple to write and should work faster) - this by using CTE . You can select TOP X rows in the CTE and then delete it , this will be done in a loop .

    If You want I can give an example .

    Sincerely

    Kalman