Subject | Best table structure for Debit/Credit |
---|---|
Author | Adam |
Post date | 2006-06-19T06:54:52Z |
Hi Group,
I have a table that stores debit and credit transactions. At the
moment, a positive value in the amount field means a deposit and a
negative value in the amount field means a withdrawal.
I need to display the total deposits, total withdrawals and balances,
but using the current table structure that requires three subselects.
This is obviously not an unusual problem, Is the way I have done it
the best way to do it, or would it be better to have separate fields
for debits and credits?
TIA
Adam
I have a table that stores debit and credit transactions. At the
moment, a positive value in the amount field means a deposit and a
negative value in the amount field means a withdrawal.
I need to display the total deposits, total withdrawals and balances,
but using the current table structure that requires three subselects.
This is obviously not an unusual problem, Is the way I have done it
the best way to do it, or would it be better to have separate fields
for debits and credits?
TIA
Adam