May 15, 2010 at 1:53 am
Hi everyone , i need help to do this query as i have two tables in database
1- First Table called "Accounts" which have the following fields
AccountIDAccountNameParentIDLevel
1x null0
2x111
3x1122
4x11133
5x11233
6x1222
7x12163
8x12263
9x12363
10x211
11x21102
12x211113
13x2111124
14x2112124
15x2113124
16x22102
17x221163
18x222163
19x223163
20x311
and the second table called "AccountBalance" which has the following fields :
AccountIDAccountNameDebitCredit
4x1111010
5x1121010
7x121015
8x122150
9x1232030
13x2111100
14x21122030
15x21135040
17x2217422
18x2225050
19x2237080
now i want to make a sql query to get sum of each level to give me this result
AccountIDAccountNameDebitCredit
1x429407
2x15565
3x112020
4x1111010
5x1121010
6x123545
7x121015
8x122150
9x1232030
10x2324282
11x218070
12x2118070
13x2111100
14x21122030
15x21135040
16x22244212
17x2217422
18x2225050
19x2237080
20x35060
so how can i get this result
please help me to do this .....
thanks alot for help
May 15, 2010 at 2:12 am
duplicate post.
Please continue discussion here.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply