Posted By

wh0emPah on 03/31/10


Tagged


Versions (?)

aaze


 / Published in: PL/SQL
 

  1. CREATE OR REPLACE PROCEDURE P1_6_SALARISVERHOGING
  2. (
  3. P_PERSNR IN S_EMP.ID%TYPE
  4. ) AS
  5. V_TITLE S_EMP.TITLE%TYPE;
  6. SELECT UPPER(TITLE)
  7. INTO V_TITLE
  8. FROM S_EMP
  9. WHERE ID = P_PERSNR;
  10.  
  11. WHEN V_TITLE = 'STOCK CLERK' THEN
  12. UPDATE S_EMP
  13. SET SALARY = SALARY * 1.025
  14. WHERE ID = P_PERSNR;
  15. DBMS_OUTPUT.PUT_LINE('Clerck Updated');
  16. WHEN V_TITLE = 'SALES REPRESENTATIVE' THEN
  17. IF P1_5_TOTAALBEDRAG_ORDERS(P_PERSNR) > 100000 THEN
  18. UPDATE S_EMP
  19. SET SALARY = SALARY * 1.03
  20. WHERE ID = P_PERSNR;
  21. DBMS_OUTPUT.PUT_LINE('Sales representative Updated');
  22. DBMS_OUTPUT.PUT_LINE('Sales representative NOT Updated');
  23. WHEN V_TITLE = 'WAREHOUSE MANAGER' THEN
  24. UPDATE S_EMP
  25. SET SALARY = SALARY * 1.05
  26. WHERE ID = P_PERSNR;
  27. DBMS_OUTPUT.PUT_LINE('Warehousemanager updated');
  28. END P1_6_SALARISVERHOGING;

Report this snippet  

You need to login to post a comment.