Dear all,
 
I have below table
 
+-----+--------------------+---------------------+
 | id   |    db                    |cr                          |
+-----+--------------------+---------------------+
 |1     |                            | 200                      |
 |2     | 100                    |                              |
 |3     | 100                    |                              |
 |4     | 150                    |                              |
 |5     |                            | 200                      |
 
I Would like to calc that balance, and look like
 
+-----+--------------------+---------------------+-----------+
 | id   |    db                    |cr                          | bal        |
+-----+--------------------+---------------------+-----------+
 |1     |                            | 200                      |200       |
 |2     | 100                    |                              |100       |
 |3     | 100                    |                              |0            |
 |4     | 150                    |                              |-150      |
 |5     |                            | 200                      |50         |
 
 
What can I do to get result like that
 
 
 
 
 
 
 
 
 
 

Reply via email to