Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Best way to execute a function

RE: Best way to execute a function

From: Wittenmyer Joel - CO <WITTENMYERJ_at_tusc.com>
Date: Fri, 8 Jun 2007 17:29:17 -0500
Message-ID: <BB9C776D8D81DE4A9F217235582F6CF2022156EF@TUSCMAIL.tusc.ad>


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

Declare

Variable <type>;

Begin

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

End;  

I would wrap it in a package for security.  


From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Rumpi Gravenstein Sent: Friday, June 08, 2007 2:49 PM
To: sbecker6925_at_gmail.com
Cc: oracle-l
Subject: Re: Best way to execute a function  

Sandy,

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_at_gmail.com> wrote:

RHEL 4.0, Oracle 9.2.0.8, 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_at_customersite(RPAD
<mailto:pwrfunc.oragen_at_customersite%28RPAD> (?, 25)||RPAD(?, 25)||RPAD(?, 30)|| RPAD(?, 60)) from dual;  

Any suggestions?  

Sandy

-- 
Rumpi Gravenstein 


--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 08 2007 - 17:29:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US