You need to change you SQL Script.
Refer this
DECLARE @SSBill TABLE (Code INT,Customer VARCHAR(50), Amount INT)
INSERT INTO @SSBill VALUES(1,'abc',45)
INSERT INTO @SSBill VALUES(2,'pqr',3)
DECLARE @SSPAY TABLE (Code INT,Customer VARCHAR(50), Amount INT)
INSERT INTO @SSPAY VALUES(1,'abc',4)
INSERT INTO @SSPAY VALUES(2,'pqr',2)
Select bill.Code,bill.Customer, pay.Amount as PayAmount,bill.Amount as BillAmount From @SSBill bill,@SSPAY pay Where (pay.code=bill.Code and pay.Amount != bill.Amount)
You will get Data like this
Code Customer PayAmount BillAmount
1 abc 4 45
2 pqr 2 3
Now you are having two different column name.
string.Format("{0:#,##0.##}", dt.Compute("sum(BillAmount)", ""));
string.Format("{0:#,##0.##}", dt.Compute("sum(PayAmount)", ""));