Hi all, what i need is to make a sum to get a balance on a bank accound database.
I have this on my table:
numid accid type amount
1 1000 D 1200
2 1000 D 1000
3 1000 C 500
4 1000 C 200
5 1000 D 1000
6 1000 C 500
7 1000 C 300
8 1000 D 2000
what i need is another table with the balance of the account
example:
numid accid type amount balance
1 1000 D 1200 1200
2 1000 D 1000 2200
3 1000 C 500 1700
4 1000 C 200 1500
5 1000 D 1000 2500
6 1000 C 500 2000
7 1000 C 300 1700
8 1000 D 2000 3700
C= Cheq and most be sustract
D= Depot and mos be added
some help will be apreciated
thanks in advance
numid accid type amount balance
I have this on my table:
numid accid type amount
1 1000 D 1200
2 1000 D 1000
3 1000 C 500
4 1000 C 200
5 1000 D 1000
6 1000 C 500
7 1000 C 300
8 1000 D 2000
what i need is another table with the balance of the account
example:
numid accid type amount balance
1 1000 D 1200 1200
2 1000 D 1000 2200
3 1000 C 500 1700
4 1000 C 200 1500
5 1000 D 1000 2500
6 1000 C 500 2000
7 1000 C 300 1700
8 1000 D 2000 3700
C= Cheq and most be sustract
D= Depot and mos be added
some help will be apreciated
thanks in advance
numid accid type amount balance