Re: Best way to execute a function

  • From: "Rumpi Gravenstein" <rgravens@xxxxxxxxx>
  • To: WITTENMYERJ@xxxxxxxx
  • Date: Fri, 8 Jun 2007 19:26:03 -0400

Yes that's the way to do it.  Only one small change -- have the function
output be assigned directly to a bind variable.

On 6/8/07, Wittenmyer Joel - CO <WITTENMYERJ@xxxxxxxx> wrote:

 Well, a function is supposed to return a value, so you would have to:


Variable <type>;


Variable := function(a,b,…);


I would wrap it in a package for security.


*From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:
oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Rumpi Gravenstein
*Sent:* Friday, June 08, 2007 2:49 PM
*To:* sbecker6925@xxxxxxxxx
*Cc:* oracle-l
*Subject:* Re: Best way to execute a function


What's wrong with putting the function in a PL/SQL block?   If the
function is closely associated with a query I could see it being called as
part of that query.

On 6/8/07, *Sandra Becker* <sbecker6925@xxxxxxxxx> wrote:

RHEL 4.0, Oracle, Java.

A developer just asked me the best way to execute a function.  I can't say
that I've ever seen it outside of a procedure and haven't found any
information on another way to do it during my search this morning.  He said
he tried using a call statement, but couldn't get it to return any results.
He is currently using the following statement:

select pwrfunc.oragen@customersite(RPAD
<pwrfunc.oragen@customersite%28RPAD>(?, 25)||RPAD(?, 25)||RPAD(?, 30)||
RPAD(?, 60)) from dual;

Any suggestions?


Rumpi Gravenstein

Rumpi Gravenstein

Other related posts: