Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to execute package's function?
On Wed, 27 Aug 1997 22:04:36 -0700, Stephen <c6635500_at_comp.polyu.edu.hk> wrote:
>Hello all,
>
> If I create a package with function, how to execute this function in
>SQL*PLUS? I know that I can type "exec package_name.procedure_name" in
>SQL*PLUS to execute the package's procedure. But when I type "exec
>package_name.function_name" in SQL*PLUS, an error messages (procedure is
>undefined) will be shown. Could anyone tell me is it possible to execute
>package's function in SQL*PLUS?
>
>Thanks,
>Stephen
You must do something with the function result. You could....
SQL> set serveroutput on
SQL> exec dbms_output.put_line( packge_name.function_name )
Or
SQL> declare > val varchar2(2000); > begin > val := package_name.function_name; > end; > /
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |