• Wouldn't the scan be expected with the additional criteria since Quantity is not part of nor included in the index?

    If I make the index ProductID, Quantity or add Quantity as an included column I still get a seek.

    Im guessing that the optimizer is ignoring the Quantity SARG's as @Quantity is NULL.

    Cant prove that an the moment though



    Clear Sky SQL
    My Blog[/url]