Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-09-01 : 06:05:58
|
Dear experts i need a query like thisi have a table like this.accno name amount running_total1 a 50 502 b 60 1103 c 70 1804 d 80 260like thisthe running total column should be automatically updated when ever i entered value to the amount column.please help me in this regard. |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-09-01 : 06:20:49
|
something like this...SELECT ACCNO, NAME, AMOUNT, (SELECT SUM(AMOUNT) FROM TABLE Y WHERE Y.ACCNO <= X.ACCNO) AS RUNNING_TOTALFROM TABLE X Harsh AthalyeIndia."Nothing is Impossible" |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-09-01 : 06:28:51
|
Oh this is really great help Mr.athalye.thank you very much for this query |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-09-01 : 10:22:56
|
Where do you want to show data?If you use Reports use Running Total feature thereMadhivananFailing to plan is Planning to fail |
|
|
|
|
|