1.Create a function called GET_ANNUAL_COMP to return the annual salary computed from an employees monthly salary and commission passed as parameters.

a.Develop and store the function GET_ANNUAL_COMP, accepting parameter values for monthly salary and commission. Either or both values passed can be NULL, but the function should still return a non-NULL annual salary. Use the following basic formula to calculate the annual salary:

(salary*12) + (commission_pct*salary*12)

Test the function using host variable:

1> if salary and commission_pct have valid data
2> if salary has a valid data, but commission_pct is NULL
3> if salary is NULL, but commission _pct has a valid data
4> both salary and commission_pct are NULL

b.Use the function in a SELECT statement against the EMPLOYEES table for employees in department 30.

2.Document your code and capture a screen shot for each test you perform.

1.Create a function called GET_YRS_OF_SERVICE to return the years of service of each employee computed from an employees hire date.

a.Develop and store the function GET_YRS_OF_SERVICE, accepting parameter values for date_hired.

Test the function using an anonymous PL/SQL block:

b.Use the function in a SELECT statement against the EMPLOYEES table for employees in department 80.

2.Document your code and capture a screen shot for each test you perform.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.