WHERE IS THE ERROR UNABLE TO SPOT IT
Errors for FUNCTION EMPTYPE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
7/5 PLS-00103: Encountered the symbol "RETURN" when expecting one of
the following:
. ( * @ % & - + / at mod rem then <an exponent (**)> and or
||
The symbol "then was inserted before "RETURN" to continue.
9/5 PLS-00103: Encountered the symbol "RETURN" when expecting one of
the following:
. ( * @ % & - + / at mod rem then <an exponent (**)> and or
||
The symbol "then was inserted before "RETURN" to continue.
LINE/COL ERROR-------- -------------------------------------------------------------
CREATE OR REPLACE FUNCTION emptype(paytype char)
RETURN Varchar2 IS
BEGIN
if paytype ='h' then
return 'hourly';
elsif paytype ='s'
return 'salaried';
elsif paytype ='e'
return 'executive';
else
return 'invalid type';
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN 'Error encountred';
END emptype;
/
please reply