Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. declare
  2. deptno number(3) :=50;
  3. jami number(10):=0;
  4. c_salary employees.salary%type;
  5. c_pct EMPLOYEES.COMMISSION_PCT%type;
  6. cursor cur is select salary,commission_pct
  7. from employees
  8. where department_id=deptno;
  9. begin
  10. open cur;
  11. loop
  12. fetch cur into c_salary,c_pct;
  13. jami :=jami + ( c_salary + c_salary*nvl(c_pct,0) ) *12 ;
  14. exit when cur%notfound;
  15. end loop;
  16. dbms_output.put_line('50 departamentis xelfasia(komisiis chatvlit)' || jami);
  17. close cur;
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement