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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How can i coll a procedure in a function

Re: How can i coll a procedure in a function

From: Damien Salvador <damien.salvador_at_via.ecp.fr>
Date: 18 Nov 2001 10:13:32 GMT
Message-ID: <slrn9vf2ec.eig.damien.salvador@zen.via.ecp.fr>


On Sun, 18 Nov 2001 04:09:27 GMT, jane
<janeyiu_at_optonline.net> a écrit:
>How do you call *any* module in *any* module ?
>Just call it in the execution section feeding any required
>parametres like...
>
>procedure_1;

Beware, there are traps in calling procedure from functions, as you cannot do a DML (create table, drop, aso ) in a function, so if I remember correctly, you'll get an error when calling a procedure in a function.

I order to do that you've got to specify explicitly that your procedure is "clean" (see purity level).

Have a look at :
<http://www.google.fr/search?q=cache:1otT6lzdFDQ:www.cs.purdue.edu/homes/ kvz/cs348/S00/supplementary/OraObject.ppt+purity+oracle+function +procedure&hl=fr>

(sorry for the length, I wrapped manually, but slrn doesn't want any line longer than 80 chars ...)

search for "purity" level inside the doc, everything's explained.

>
>BTW, your SELECTs look really weird: select...as ?
>> select function_1(columnname) as tablename;
>> or
>> select function_1(columnname) as dual;

unless he is defining views, but that's weird for "as dual" :-)

-- 
Damien
Received on Sun Nov 18 2001 - 04:13:32 CST

Original text of this message

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