The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 5 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Needed no later than 9:30PM Central Standard time - We are using iSQL Plus 9.2
2. Write an anonymous PL/SQL block to calculate the yearly bonus that a
company gives to its employees. The bonus is determined by considering two factors: (1) how many years the employee has worked at the company; (2) employee job type.
If an employee has worked 1-6 years, then he or she receives a $150 bonus; 7-10 years merits a $200 bonus; 11-15 years merits a $300 bonus, and 16 or over 16 years merits a $500 bonus.
Employees in Job ID “SA_REP” receive an additional $300 bonus, and employees in other types receive an additional $200 bonus.
Sample input and output:
a. Output with employee_id = 120:
SET SERVEROUTPUT ON
DEFINE p_empno = 120
(Execute these commands, and then clear the screen. Next, execute the program code)
The bonus for this employee is: $500
PL/SQL procedure successfully completed
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll