• Eirikur Eiriksson (8/2/2014)


    CONVERT(INT,P.[20140728]) + CONVERT(INT,P.[20140804])

    Hi Eirikur

    I dont fully agree that it has the same flexibility.

    For example in my suggestion i can create any date range as a integer presentation and it will automatically add up all values that are valid.

    Where in your example this is a manual process.

    Dont get me wrong yours will still work. But i find my solution more dynamic and flexible.

    I however do agree that any changes to the table structure will increase the complexity of the Pivot where your solution only will need more converts

    🙂

    Hope this makes sense?

    --------------------------------------------------------------------------------------------------------------------------------------------------------
    To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
    http://www.sql-sa.co.za