The error message tells you all: EMP_SEL is not a procedure, it's a function.
You cannot execute functions like that. Functions are called and not executed.
try something like
declare
ret varchar2(3);
begin
ret:=emp_sel('gali');
dbms_output.put_line('RET:'||ret);
end;
/
On 2003.06.06 07:35 purushottam krishna hegde wrote:
> hi all,
> this is purushottam hegde from Bangalore(IND)
> i am relatively new to oracle and so to this group.
> iam having a problem with function...
> it goes like this.
>
>
>
> SQL> CREATE OR REPLACE FUNCTION EMP_SEL(ename IN Varchar2) return varchar2 is
> 2 resex varchar2(3);
> 3 Begin
> 4 SELECT sex into resex from emp where name=ename;
> 5 return(resex);
> 6 END;
> 7 /
> Function created.
>
> SQL> EXECUTE EMP_SEL('gali');
> BEGIN EMP_SEL('gali'); END;
> *
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00221: 'EMP_SEL' is not a procedure or is undefined
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
>
>
> pl help me in this regard
>
> thanking all of u
>
> purushottam hegde
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Free online calendar with sync to Outlook(TM).
--
Mladen Gogala
Oracle DBA
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Mladen Gogala
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).