Dear Askddbc, I am in a critical situation in developing a program unit for calculating interest. Following is the situation. looking for you help The below is the loan details of a customer that is in the table Loan refno transtype amount interest rate Date 100014 PBK 50000 6% 01-01-06 100014 PCP 10000 4.5% 10-01-06 100014 PCP 15000 6.5% 20-01-06 100014 PRL 40000 - 01-02-06 100014 PRL 20000 - 15-02-06 100014 PRL 15000 - 21-02-06 PBK - PURCHASE BILL BOOKING PCP - ADDITION LOAN TAKEN PRL - PART REALISATION history of the loan The customer on 01-01-06 has taken a loan of rs 50000 @ 6% then on 10-01-2006 the customer is taking a additional loan of 10000@4.5%.Then again on 20-01-2006 the customer is taking a additional loan of 15000. so is total loan amount is 75000/- Now the customer is repaying part of his loan amount of 40000 on 01-02-2006 and the an amount of rs 20000 on 15-02-2006 and finally the remaining amount on 21-02-06. When the customer is paying the entier amount the interest will be calculated.In this case the interest will be calculated on 21-02-2006 as on that day he is paying the enter amount of the loan(75000). The interest should be calculated as follows 01-01-06 to 09-01-06 50000@6% 10-01-06 to 19-01-06 50000@6% 10-01-06 to 19-01-06 10000@4.5% 20-01-06 to 31-01-06 50000@6% 20-01-06 to 31-01-06 10000@4.5% 20-01-06 to 31-01-06 15000@6.5% 01-02-06 to 14-02-06 10000@6% Dear Askddbc, I am in a critical situation in developing a program unit for calculating interest. Following is the situation. looking for you help The below is the loan details of a customer that is in the table Loan refno transtype amount interest rate Date 100014 PBK 50000 6% 01-01-06 100014 PCP 10000 4.5% 10-01-06 100014 PCP 15000 6.5% 20-01-06 100014 PRL 40000 - 01-02-06 100014 PRL 20000 - 15-02-06 100014 PRL 15000 - 21-02-06 PBK - PURCHASE BILL BOOKING PCP - ADDITION LOAN TAKEN PRL - PART REALISATION history of the loan The customer on 01-01-06 has taken a loan of rs 50000 @ 6% then on 10-01-2006 the customer is taking a additional loan of 10000@4.5%.Then again on 20-01-2006 the customer is taking a additional loan of 15000. so is total loan amount is 75000/- Now the customer is repaying part of his loan amount of 40000 on 01-02-2006 and the an amount of rs 20000 on 15-02-2006 and finally the remaining amount on 21-02-06. When the customer is paying the entier amount the interest will be calculated.In this case the interest will be calculated on 21-02-2006 as on that day he is paying the enter amount of the loan(75000). The interest should be calculated as follows 01-01-06 to 09-01-06 50000@6% 10-01-06 to 19-01-06 50000@6% 10-01-06 to 19-01-06 10000@4.5% 20-01-06 to 31-01-06 50000@6% 20-01-06 to 31-01-06 10000@4.5%--as 40000 has been repayed that amount is be ajusted with the 50000 taken on 01-01-06 20-01-06 to 31-01-06 15000@6.5% 01-02-06 to 14-02-06 10000@6% 01-02-06 to 14-02-06 10000@4.5% 15-02-06 to 21-02-06 15000@6.5%-- as the 20000 repayed on 15-02-06 is been ajusted with 10000 taken on 01-01-06 and other 10000 is been adjusted with the 10000 taken on 10-01-06. and the remaining amount of 15000 is the balance that has to be calucated @ 6.5% has that 15000 belongs to the loan taken on 20-01-06 We are using oracle version 8 Could you please guide how this can be implemented..... Waiting for your reply 01-02-06 to 14-02-06 10000@4.5% 15-02-06 to 21-02-06 15000@6.5%-- as the 20000 repayed on 15-02-06 is been ajusted with 10000 taken on 01-01-06 and other 10000 is been adjusted with the 10000 taken on 10-01-06. and the remaining amount of 15000 is the balance that has to be calucated @ 6.5% has that 15000 belongs to the loan taken on 20-01-06 We are using oracle version 8 Could you please guide how this can be implemented..... Waiting for your reply