• Adrian,

    Your solution would be more elegant indeed, but it doesn't work.

    Unfortunately, the TOP keyword accepts only a constant, not a variable.

    Dinesh,

    Indeed, I would not add an index to a Qty column.

    Razvan