Re: How to execute package's function?

From: Tomm Carr <carr%tw_at_edwards.af.mil>
Date: 1997/08/27
Message-ID: <34043C4C.2AB0_at_edwards.af.mil>#1/1


Stephen wrote:
>
> 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
[Quoted] > package's function in SQL*PLUS?

Yes, but PL/SQL is not like C/C++ in that you must call a function as a function, never as a procedure. So your call must be in the form:

  myvar := package_name.function_name;
or
  if package_name.function_name > somevalue then   ...

-- 
Tomm Carr  --> Note new e-mail address
tommcatt_at_computer.org -- http://www.geocities.com/athens/delphi/6769
-- The Macintosh computer is like the open range;
-- In a world without fences, there are no Gates.
Received on Wed Aug 27 1997 - 00:00:00 CEST

Original text of this message