title: How to remove null rows in when using union all in multiple tables
body: <p><strong>How to remove null rows in when using union all in multiple tables</strong>   </p>
  
  <pre><code>declare @FromDate date='2018-05-01';
      declare @ToDate date='2018-05-10';
  
      select ROW_NUMBER() OVER(ORDER BY (SELECT 1)) AS [SNO],t.MNO,MNAME ,isnull(sum(v1),0.00) as Balance,isnull(sum(v2),0.00) as CurrentPurchase,isnull(sum(v3),0.00) as Deduction
      from (select MNO, PendingDeduc as v1, NULL as v2, NULL as v3
            from tblProductPurchaseBalance where EntryDate between @FromDate and @ToDate union all
            select MNO, NULL as v1, TotalAmount, NULL as v3
            from tblMnoProductPurchase where PurchaseDate between @FromDate and @ToDate union all
            select MemNo as MNO, NULL as v1, NULL as v2, AAVIN
            from tblDeduction where EntryDate between @FromDate and @ToDate       
           ) t inner join TBLMEMBERS on t.MNO=TBLMEMBERS.MNO
      group by t.MNO,MNAME
      order by t.MNO
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jHkWr.png" rel="nofollow noreferrer">Sample Data And Result I need</a></p>