2011年2月8日星期二

running balance in TD no_book

There are two columns in the TD_NOBOOK table, one is amt_acct_running_bal and the other is amt_dep_running_bal. Generally, the amt_dep_running_bal is for TD transaction's running balance, but only in the following case that cod_passbk_lvl was set to 2 in the td_prod_mast table when amt_dep_running_bal will be populated.

So we still have to calculating running balance of TD transactions by first query the opening balance/previous transaction's running balance, then Dr/Cr the amount from the previous transaction's running balance(for the first transaction, the previous transaction's running balance is the opening balance).

If the cod_passbk_lvl was not set to 2, then NULL will be set to the amt_dep_running_bal column.