(SELECT * FROM t1) UNION [ALL] (SELECT * FROM t2 )
CustName
Mth
select a.CustName, a.Mth, a.tbbTotal, b.pendAmt, c.collAmt from Table_A a join Table_B b on (a.CustName = b.CustName and a.Mth = b.Mth) join Table_C on (a.CustName = c.CustName and a.Mth = c.Mth)
SELECT CustName, Mth, tbbTotal, 0 AS pendAmt, 0 AS collAmt FROM TableA UNION SELECT CustName, Mth, 0 AS tbbTotal, pendAmt, 0 AS collAmt FROM TableB UNION SELECT CustName, Mth, 0 AS tbbTotal, 0 AS pendAmt, collAmt FROM TableC
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)