select fg.AdmissionNo,SName,FName,FPhone,NetBal,Paid
,ISNULL((SELECT sum(RemBal) FROM tblFeesCollection where AdmissionNo='R-000002'),0) 'RemBal'
,(NetBal + ISNULL((SELECT sum(RemBal) FROM tblFeesCollection where AdmissionNo='R-000002'),0)) 'Total Fees'
from tblFeesGenerate as fg inner join tblFeesCollection as fc on fg.AdmissionNo=fc.AdmissionNo
inner join tblStdReg as sr on fg.AdmissionNo=sr.AdmissionNo
where fc.FeesMonth='9-Sep'
and fg.AdmissionNo='R-000002'
group by fg.AdmissionNo,SName,FName,FPhone,FeesMonth,NetBal,Paid,RemBal order by fg.AdmissionNo

Disclaimer: This site is started with intent to serve
the ASP.Net Community by providing forums (question-answer) site where people can
help each other. The content posted here is free for public and is the content of
its poster. The site does not provide any warranties for the posted content. If
you feel any content is violating any terms please
contact.

Disclaimer

This site makes use of Cookies. Please refer Privacy Policy for more details.