Hi. I am trying to develop a loan application which must produce a loan schedule. Monthly deducted value for each payroll period is stored at a different table, including the employee id, loan no, and payroll period. If the loan is paid externally (settled outside loan schedule), it is also recorded in the table. How can I generate a schedule for each loan given that, Loan start date, loan period (no of months), and payable amount is given. Suppose if a loan is taken on 01/01/2010 for 12 months, it must generate a schedule based on the information from monthly deducted table displaying the number of months for the loan, total paid, and the remaining balance from the loan total amount. Could some please kindly provide a sql query to generate this schedule based on values from three tables
1. Main Loan table (which contains the start date, end date, loan period, granted loan amount, payable amount)
2. Monthly deduction table (which contains information about monthly paid info, suppose loan no and the amount paid for that specific month)
3. External Paid info table (which contains information about the loans settled externally from the loan schedule)
Thanks in advance.
View Complete Post