I have a table which i would like to get some calculations from a querry
What is the best solution
I have a balance transactionAmount TransactionType and newAmount
Balance TransactionAmount TransactionType newAmount
200 50 1 ?
i want to calculate the new amount in the querry. the issue is if the transaction type is "1" i want to add the balance to the transactionAmoun.
If the transactionType is 2 i will like the perform a subtraction: balance -transactionAmount
How do i achieve this
What is the best solution
I have a balance transactionAmount TransactionType and newAmount
Balance TransactionAmount TransactionType newAmount
200 50 1 ?
i want to calculate the new amount in the querry. the issue is if the transaction type is "1" i want to add the balance to the transactionAmoun.
If the transactionType is 2 i will like the perform a subtraction: balance -transactionAmount
How do i achieve this