Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how can i exeucte stored function in sqlplus program.
select function_name() from dual
may do the trick
"ÀÌ¿µÇÑ" <hotyoung_at_netnsec.com> wrote in message
news:cyP_8.136068$nP6.13147113_at_news.bora.net...
> I made PL/SQL code like below and stored oracle.
>
> $ cat func.sql
> create function emp_insert ( my_empno in emp.empno%type, my_ename in
> emp.ename%type ) return boolean as
> begin
> insert into emp( empno, ename ) values( my_empno, my_ename );
> return true;
> exception
> when others then
> return false;
> end;
> /
>
>
> --------------------------------------------------------------------------
--Received on Mon Jul 22 2002 - 07:20:49 CDT
> ----
>
>
> When I executed this function in sqlplus, I showed error like below.. how
> can i execute stored function in sqlplus.
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> SQL> call emp_insert ( 200, 'you' );
> call emp_insert ( 200, 'you' )
> *
> ERROR at line 1:
> ORA-06576: not a valid function or procedure name
>
> SQL> execute emp_insert( 100, 'you' );
> BEGIN emp_insert( 100, 'you' ); END;
>
> *
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00221: 'EMP_INSERT' is not a procedure or is undefined
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
>
> SQL> emp_insert( 100, 'you' );
> SP2-0734: unknown command beginning "emp_insert..." - rest of line
ignored.
> SQL> call emp_inert( 100, 'you' );
> call emp_inert( 100, 'you' )
> *
> ERROR at line 1:
> ORA-06576: not a valid function or procedure name
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
>
>
>
![]() |
![]() |