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 |
samir.first
Starting Member
34 Posts |
Posted - 2014-02-10 : 11:36:46
|
i have chart of Tree account is dynamic not static i don`t now nubmer of levels but i now balance of last level i need to get sum before level and before ...etcAccount Code Balance level No 11 11101 211010001 50 311010002 10 31102 211020001 30 311020002 12 312 11201 212011009 55 312011010 2 31202 212020001 66 312020002 92 3 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-02-11 : 00:58:00
|
use a recursive cteseehttp://technet.microsoft.com/en-us/library/ms186243(v=sql.105).aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|