package chk_pack [message #270627] |
Thu, 27 September 2007 12:32  |
manoj9999
Messages: 2 Registered: September 2007
|
Junior Member |
|
|
when trying to run the following code it is raising an error
can any body help me whats the errors is
this is my package specification
CREATE OR REPLACE package chk_pack
is
procedure chk_hiredate
(P_hdate in emp.hiredate%type);
procedure chk_dept_mgr
(p_empnr in emp.empno%type,
P_mgr in emp.mgr%type);
end chk_pack;
/
and the package body is
create or replace package body chk_pack
is
procedure chk_hiredate
(p_hdate in emp.hiredate%type)
is
v_lhdate emp.hiredate%type:=add_months(sysdate,-(50*12));
v_hihdate emp.hiredate%type:=add_months(sysdate,3);
begin
if (P_hdate) not between v_lhdate and v_hihdate or P_hdate is null then
raise_application_error(-20344,'not a valid date');
end if;
end chk_hiredate;
procedure chk_dept_mgr
(p_empnr in emp.empno%type,
P_mgr in emp.mgr%type)
is
v_deptno emp.deptno%type;
v_empno emp.empno%type;
begin
select deptno
into v_deptno
from emp
where empno=p_empnr;
exception
when no_data_found then
raise_application_error(-20346,'not a valid empno');
end;
begin
select empno
into v_empno
from emp
where empno=p_mgr
and job='MAN%'
and deptno=v_deptno;
exception
when no_data_found then
raise_application_error(-20346,'not a valid manager for this department');
end;
end chk_dept_mgr;
end chk_pack;
and the error iam getting is
PLS-00103: Encountered the symbol "END"
at line 39:1
|
|
|
|
|
|