Hi
purushotam,
since
it is a function that you are creating , its return value needs to be
collected.
hence
after BEGIN clause give a statement like
v_ret:=EMP_SEL('gali'); where v_ret
is a local variable of type varchar2
This will work.
Regards
Kesh
-----Original Message-----
From: purushottam krishna hegde [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 5:05 PM
To: Multiple recipients of list ORACLE-L
Subject: procedure/function errorhi 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 ignoredpl help me in this regardthanking all of upurushottam hegde
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
Visit us at http://www.cognizant.com