daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Mar 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DECLARE
  2.   id NUMBER;
  3.   gaji NUMBER;
  4.   tgl DATE;
  5.   lama NUMBER;
  6.   bonus NUMBER;
  7. BEGIN
  8.   id := &e_id;
  9.   gaji := &g;
  10.   tgl := &tg;
  11.  
  12.   lama := ROUND((SYSDATE-tgl)/365);
  13.   IF lama > 20 AND gaji < 20000 THEN
  14.     bonus := 0.05 * gaji;
  15.   ELSIF lama > 20 AND gaji > 20000 THEN
  16.     bonus := 0.01 * gaji;
  17.   ELSIF lama < 20 AND gaji < 15000 THEN
  18.     bonus := 0.1 * gaji;
  19.   ELSIF lama < 20 AND gaji > 15000 THEN
  20.     bonus := 0.07 * gaji;
  21.   ELSE bonus := 0.02 * gaji;
  22.   END IF;
  23.   DBMS_OUTPUT.PUT_LINE('Hasil : ' || bonus);
  24. END;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top