• Do you have sample data showing the "intermediate values" "step by step"?

    I'm having a hard time to understand differences between adjecent values (adjecent in time), especially, since there are duplicate time values...

    A few sample data would really help.

    My approach most probably will be a CTE with ROW_NUMBER and a "self reference" to this cte with an offset of +1 to get the two values required for the "adjecent values differences".



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]