TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Madhan M
NA
95
3.6k
Loan balance details All Employee Example here
Jun 8 2017 5:49 AM
select distinct E.C_Employeecode,E.F_Loan_Amt as Total_Amt,
E.F_No_Of_Installment as Total_Inst,
ISNULL(SUM(R.F_Amount),0) AS 'PAID AMT',
E.F_Loan_Amt-ISNULL(SUM(R.F_Amount),0) As 'Balance_Amt',
CEILING((E.F_No_Of_Installment-ISNULL(SUM(R.F_Amount),0))/(R.InstAmt*1.))'Balance.Instal'
From
(
select C_EmployeeCode,C_LoanCode,Sum(F_Amount)F_Amount,MAX(F_Amount)as InstAmt
from Loan_recovery where C_Employeecode='50173' GROUP BY C_Employeecode,C_LoanCode
) R
LEFT JOIN LoanAvail_Entry E on R.C_Employeecode=E.C_Employeecode and E.C_Employeecode='50173'
GROUP BY E.C_Employeecode,InstAmt,E.F_No_Of_Installment,E.F_Loan_Amt
Reply
Answers (
1
)
How can I convert SSIS 2014 solution to SSIS 2008 solution?
how to generate loan balance sheet totalamt,paidamt,total