hi i have a query created for a table with 3 fields like,
1)name 2)sum of credit 3)sum of debit
Now i need an extra field like
4)sum that is [sum of credit]-[sum of debit] but when i give this in a query if the difference is there then it is coming but if there is no value in debit then the value in credit should come or if no value in credit - value should come
NOW I GET LIKE THIS
NAME SUMOFCREDT SOMEOFDEBIT sum
Tom 100
purchace 5000
salse 1000
jon 4000 1000 3000
BUT I SHOULD GET LIKE
NAME SUMOFCREDT SOMEOFDEBIT sum
Tom 100 100
purchace 5000 5000
salse 1000 -1000
jon 4000 1000 3000
Peter 1000 4000 -3000
1)name 2)sum of credit 3)sum of debit
Now i need an extra field like
4)sum that is [sum of credit]-[sum of debit] but when i give this in a query if the difference is there then it is coming but if there is no value in debit then the value in credit should come or if no value in credit - value should come
NOW I GET LIKE THIS
NAME SUMOFCREDT SOMEOFDEBIT sum
Tom 100
purchace 5000
salse 1000
jon 4000 1000 3000
BUT I SHOULD GET LIKE
NAME SUMOFCREDT SOMEOFDEBIT sum
Tom 100 100
purchace 5000 5000
salse 1000 -1000
jon 4000 1000 3000
Peter 1000 4000 -3000