• thomasrichardson2000 (10/11/2012)


    "What do you see if you order the results by Vehicle.modelId? Do you get multiple rows per model? That's what I'm looking for."

    Yes when I order them by Vehicle.modelId I get multiple rows per model, these are models that have had tyres changed etc, I need the total models column to give me the total amount of those models in the fleet, irrespective of anything

    RepairSheetNrunitnrgroupidbrandIdmodelIdversionType_Fleetclose_dateTotalModels

    500007651EDMNPEUGEOT207 S 1.48VOF 2012-03-06 00:00:00.00047

    Good. Pick a couple of models which only have about 5 or so rows, and post the data as I showed you earlier.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]