Dear Members,
kindly help me to sort this out.
I have 2 Columns like below,
C1 C2 C3
10 -- 10
30 -- 40
34 -- 74
66 -- 146
C3 is my need. how 2 achieve this Cumulative sum of first column in Secont Column. Tht too in Run Time.
Kindly Help me !!
Raj.B
Hi Raj
Check out this article http://www.sqlservercentral.com/articles/Advanced+Querying/61716/, it describes in some detail how to do running totals. If you have difficulty with the article or with your specific problem, then repost. As you would expect, running total calculations are order-specific and there are some 'gotchas' - it would help people to solve the problem if you provide more information including the script for your table.
Cheers
ChrisM
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply