日期:2014-05-16  浏览次数:20587 次

继续求助,感谢大神们!
还是根据前两幅图,得出第三幅图:


通过上面的两幅图,得出下面的这一附图的效果:

谢谢咯!注意是SQL select语句完成的呢。
------解决方案--------------------
select 
   a.*,isnull(b.amount,0) as paid,
  a.amount-isnull(b.amount,0) as balance
from
   a left join b on a.InvoiceNo=b.InvoiceNo