How do i deal with this table

Joined
Feb 21, 2006
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top