Z
zyus
My query to calculate difference in net_bal of two tables
SELECT Sum([Tbl-PreviousMONTH].NET_BAL) AS SumOfNET_BAL,
Sum([Tbl-SKS].NET_BAL) AS SumOfNET_BAL1,
Sum([Tbl-PreviousMONTH].[net_bal]-[tbl-sks].[net_bal]) AS Diff
FROM [Tbl-PreviousMONTH] INNER JOIN [Tbl-SKS] ON [Tbl-PreviousMONTH].ACNO =
[Tbl-SKS].ACNO
WHERE ((([Tbl-PreviousMONTH].NPLFLG)="N" Or ([Tbl-PreviousMONTH].NPLFLG) Is
Null) AND (([Tbl-PreviousMONTH].ARRMTH) Not Between 1 And 5));
As a result i will get this
Sumofnet_bal Sumofnetbal1 Diff
1,000,000 900,000 100,000
The diff is the net figure derived from the calculation. Is there a way to
calculate how much in total the positive amount and the negative amount that
derived to 100,000 nett.
TQ
SELECT Sum([Tbl-PreviousMONTH].NET_BAL) AS SumOfNET_BAL,
Sum([Tbl-SKS].NET_BAL) AS SumOfNET_BAL1,
Sum([Tbl-PreviousMONTH].[net_bal]-[tbl-sks].[net_bal]) AS Diff
FROM [Tbl-PreviousMONTH] INNER JOIN [Tbl-SKS] ON [Tbl-PreviousMONTH].ACNO =
[Tbl-SKS].ACNO
WHERE ((([Tbl-PreviousMONTH].NPLFLG)="N" Or ([Tbl-PreviousMONTH].NPLFLG) Is
Null) AND (([Tbl-PreviousMONTH].ARRMTH) Not Between 1 And 5));
As a result i will get this
Sumofnet_bal Sumofnetbal1 Diff
1,000,000 900,000 100,000
The diff is the net figure derived from the calculation. Is there a way to
calculate how much in total the positive amount and the negative amount that
derived to 100,000 nett.
TQ