June 11, 2009 at 10:19 pm
col1 col2 col3 col4
row1 aaa 6 6( from col3 and row 1 = 6)
row2 bbb 7 3(from col4 and from row1 6+7 from col3 row2 =13 )
row3 ccc 5 18(from col4 and from row2 13+5 from col3 row3=18 )
row4 nnn 2 20(from col4 and from row3 18+2 from col3 row4= 20)
row5 hhh 1 21(from col4 and from row4 20+1 from col3 row5= 21)
row6 ttt 20 41(frm col4 and from row5 21+20 from col3 row6= 41)
now col4 for what i would like to accomplish, not sure how i can do this with sql or is it possible at all.
thank you
neil
June 11, 2009 at 11:38 pm
This is a running totals problem and is easily solved. Unfortunately Jeff's article is currently off-line, but there are numerous forum threads here on SSC that discuss it. In the search box above enter the following, site=sqlservercentral.com, running totals, click Go, then clich Forum on the results page. You will find numerous threads to check out.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply