• realvilla (6/20/2013)


    I'm trying not to bother you any more but you did ask me to give you a progress update. I am stumped. I have working on this the better part of the day and I haven't made much progress. I placed the following code at the end of your code:

    SELECT VehicleDetail.SerialNumber, VehicleDetail.ProgYear, VehicleDetail.ModelName, VehicleDetail.Region, VehicleDetail.MFG

    FROM VehicleDetail LEFT JOIN VehiclesToUpdate ON (VehicleDetail.SerialNumber = VehiclesToUpdate.SerialNumber) AND (VehicleDetail.Vin = VehiclesToUpdate.Vin)

    Where VehicleDetail.SerialNumber is null

    This returned no records which means that all of the cars are accounted for between VehiclesToUpdate and VehicleDetail. However, the number of records to update is still far short. I told you that I'm not giving up but I'm not sure what to try next.

    No problem.

    The above query returning now rows means there are no rows in VehicleDetail that don't have a serial number.

    Does this also return 0?

    SELECT count(*)

    FROM VehicleDetail

    Where VehicleDetail.SerialNumber is null

    How many vehicles do you think should be updated? How many rows are in VehiclesToUpdate?

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/