Question: Create a package named PLEDGE_PKG that includes two functions for determining dates of pledge payments. Use or create the functions described below: Function1: Determining a

Create a package named PLEDGE_PKG that includes two functions for determining dates of pledge payments. Use or create the functions described below:

Function1: Determining a Pledge's First Payment Date

Create a function named DD_PAYDATE1_PF that determines the first payment due date for a pledge based on pledge ID. The first payment due date is always the first day of the month after the date the pledge was made, even if a pledge is made on the first of a month. Keep in mind that a pledge made in December should reflect a first payment date with the following year.

Function2: Determining a Pledge's Final Payment Date

Create a function named DD_PAYEND_PF that determines the final payment date for a pledge based on pledge ID. Use the function DD_PAYDATE1_PF in this new function to help with the task. If the donation pledge indicates a lump sum payment, the final payment date is the same as the first payment date.

Test both functions with a specific pledge ID, using an anonymous block. Then test both functions in a single query showing all pledges and associated payment dates.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!