|
藍森林 http://www.lslnet.com 2006年8月26日 15:18
請高手指教!!
解雇一個員工,若該員工是最後一個員工,裁減該部門
create or replace procedure remove_and_fire_emploee
is
v_emno emploee.emno%type;
no_of_emploees number;
begin
select count(*)
into no_of_emploees
from emploee,emploee others
where emploee.emno=v_emno
and emploee.deptno=others.deptno;
if no_of_emploees=0 then
raise_application_error (-20200,'emploee does not exist.');
else if no_of_emploees=1 then
fire_emploee
remove_dept
else /*no_of_emploees>;1*/
fire_emploee
end if;
end if;
end remove_and_fire_emploee;
錯誤提示:
PLS-00103: Encountered the symbol "REMOVE_DEPT" when expecting
one of the following:
:= . ( @ % ;
哪位大哥大姐幫幫忙啊!!謝謝!! |
| |