Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calculate a value for years anually or monthly or quarterly

user11164339Nov 20 2013 — edited Nov 25 2013

Hi Gurus-

        I have a requirement to divide a particular amount Monthly/Quarterly/Anually for some years based on the starting date.So i need the pl/sql logic to achieve this one.Please help me out & let me know if any questions.

Below is my example:

Let say amount=240,starting date=01-JAN-2013,term=Quarterly/Anually/Monthly, Years=5 Years (So now i need to calculate the amount for 5 years starting from 01-JAN-2013 to 31-DEC-2017 and the output should like below)

MonthMonthly AmountQuarterly AmountAnually Amount
1-Jan-132060240
1-Feb-1320
1-Mar-1320
1-Apr-132060
1-May-1320
1-Jun-1320
1-Jul-132060
1-Aug-1320
1-Sep-1320
1-Oct-132060
1-Nov-1320
1-Dec-1320
1-Jan-142060240
1-Feb-1420
1-Mar-1420
1-Apr-142060
1-May-1420
1-Jun-1420
1-Jul-142060
1-Aug-1420
1-Sep-1420
1-Oct-142060
1-Nov-1420
1-Dec-1420

Thanks a lot !!!!

This post has been answered by Frank Kulash on Nov 25 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2013
Added on Nov 20 2013
12 comments
1,059 views