Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: Sum values on periods

    Luis Cazares (2/20/2014)


    Here's the final solution with the gaps problem solved (Hoping you won't have dates that go over 25 years in the future).(...)

    Thank you for your solution and sorry...

  • RE: Sum values on periods

    Eugene Elutin (2/20/2014)


    What in your "sample data " indicates that the stock changed on the 2014-02-03?

    We can see in your expected results only...

    Don't you have some other table which...

  • RE: Sum values on periods

    Luis Cazares (2/20/2014)


    How do you define that it goes from 10 to 15 and then back to 5?

    Result stock for partucular date is calculated:

    select ISNULL(SUM(stock), 0) from dates WITH (NOLOCK)...

  • RE: Sum values on periods

    I don't know if I understand your question correctly, but period in my case is time between FROM_DATE and TO_DATE.

    I'm not interested in time difference, just dates. However period can...

Viewing 4 posts - 1 through 4 (of 4 total)