• Sean, my question is - if the VehiclesToUpdate is obtained from the partitions in the VehicleDetail, why wouldn't they match the VehicleDetail? As you can see from the results, there are not enough cars to satisfy what was stipulated for returns.

    Select count(*), 'Update' as SQLName from VehiclesToUpdate Where Region='Southeast' And ProgYear='12' And LeaseCycle='1'And ModelName='ALTIMA S' And MFG='NIS' And RiskNonRiskFlag='R'

    GO

    Select Sum(UnitCount), 'RCount' as SQLName from ReturnsPros Where Region='Southeast' And ProgYear='12' And LeaseCycle='1'And ModelName='ALTIMA S' And MFG='NIS' And RiskNonRiskFlag='R'

    GO

    Select count(*), 'Detail' as SQLName from VehicleDetail Where Region='Southeast' And ProgYear='12' And LeaseCycle='1'And ModelName='ALTIMA S' And MFG='NIS' And RiskNonRiskFlag='R'

    GO

    The results were:

    101 for VehiclesToUpate

    101 setup from ReturnsPros

    46 in VehicleDetail