ORDS Lab 3 -- Q2
SET ECHO OFF
SET VERIFY OFF
SET SERVEROUTPUT ON
ACCEPT p_empno prompt 'Please enter employee number: '
DECLARE
v_sal emp.sal%TYPE;
v_comm emp.comm%TYPE;
BEGIN
SELECT sal INTO v_sal
FROM emp WHERE empno = &p_empno;
IF v_sal <>
v_comm := 0.1;
ELSIF v_sal between 1000 and 1500 THEN
v_comm := 0.15;
ELSIF v_sal > 1500 THEN
v_comm := 0.2;
ELSE
v_comm := 0;
END IF;
UPDATE emp
SET comm = NVL(sal, 0) * v_comm
WHERE empno = &p_empno;
COMMIT;
END;
/
**Q1 ans can be found in hn's blog, Q3 ans can be found in kel's blog. muhaha!! we r crazzie!
0800-1100: ADID Lab.
FINALLY finished e whole of lab 3 le. haha!! since last wk till today. reached at 0820.. haha!! nv been on time b4. Today is e 1st time since e start of sch.. that i stopped at tp main bus stop, normally stopped at east gate dere.. no choice, raining.
1100-1200: break.
Lunch at mensa with kel n hn
1200-1300: In3D lec.
too slpy. managed not to fall aslp for e 1st 30mins.. after tt.. slp till lec end. =\
1300-1500: ORDS Lab.
keep having alot of typo errors.. omg! so diff to spot. although there r only 4 qns for this lab, bt e typo errors i made r.. sooo many. got to thanks bob for his help.. haha!! =) e teacher is spoon-feeding us.. haha!!
going tamp ltr to get my slippers with hn n kel.
i acc hn to look 4 her fren bday present n she acc me to look 4 my slippers.
back home with my slippers.. haha!! in e end, bought at bugis village dere. dint really c any nice one in tamp, those i lk r mostly with heels. sian.
nice weather now.. cooling. =)