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

Home -> Community -> Usenet -> c.d.o.server -> Re: call a function that modifies DB ?

Re: call a function that modifies DB ?

From: Alexei Fox <alexei_fox_at_yahoo.com>
Date: 1998/01/20
Message-ID: <34C4EEBC.7D2921B2@yahoo.com>#1/1

Moreover, according to Oracle documentation, there are severe restrictions on what type of function can be called inside the SELECT statement. Look into "Application Developer's Guide", Chapter 7 "Using Procedures and Packages", section "Calling Stored Functions from SQL expressions" for the full set of rules.
Regards,

Alexei Fox

Jeroen van Sluisdam wrote:

> Hi,
>
> Select a from dual only works if nothing updates the database, so surely
>
> select a for update will not work i think, but maybe you have the same
> problem
> as we had that there's an exception in your package functions that uses
> something like "raise_application_error". That oracle function updates
> deep down the db.
> If you use it, get rid of it, try the select without update or don't use
> the select
> and use an exec with select for update in your procedure.
>
> Jeroen
>
> Bill Dietrich wrote:
>
> > Using Oracle 7, in SQL*Plus, I need to call a function
> > and get its result. I'm trying the following, and getting
> > an error:
> >
> > SQL> select apps_appdemo.icx_call.encrypt('WF') from dual for update;
> > select apps_appdemo.icx_call.encrypt('WF') from dual for update
> > *
> > ERROR at line 1:
> > ORA-06571: Function ENCRYPT does not guarantee not to update database
> >
> > What am I doing wrong, and how can I fix it ? I've tried using
> > update instead of select, tried select without "for update", etc.
> > I can't modify the function; it is an Oracle Applications function.
> >
> > Thanks,
> >
> > Bill Dietrich
> > bill_dietrich_at_wayfarer.com
Received on Tue Jan 20 1998 - 00:00:00 CST

Original text of this message

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