Re: Cannot call function in query

From: Ansgar Seiter <seiter_at_phya5.physik.uni-freiburg.de>
Date: 1997/06/06
Message-ID: <33980C5A.167E_at_phya5.physik.uni-freiburg.de>#1/1


What Server Version do I need ?
[Quoted] I've done all the above, but keep getting errors like 'invalid function' with packaged or not packaged functions (Server 7.0.16).

rgds,
Ansgar

N Prabhakar wrote:
>
> rowanm_at_intercoast.com.au (Rowan McCammon) writes: > PL/SQL: I've declared a function in a package that simply
> > returns a constant.
> >
> > When I use this function in a SQL query I get an error
> > message that tells me something like "Cannot perform
> > query as database may be updated. Cannot guarantee non-
> > update."
> >
> > If I then define a copy of this function outside the
> > package (i.e.. simply a stored function) and call it from
> > within a query, the query works fine.
> >
> > Can anyone explain this to me?
> >
> > Any help appreciated,
> > Rowan McCammon.
>
> Hi there
>
> you need to use pragma restrict references to call a function from the sql query. Define the pragma at the package header
>
> PRAGMA RESTRICT_REFERENCES (get_concat_description, WNDS, WNPS );
>
> get_concat_description is the function name and you should define
> the above line in the package header
>
> Hope it helps
>
> Good Luck
>
> N.Prabhakar
 

-- 
 Ansgar Seiter          	 Group Prof. Ch. Schlier      
 Department of Physics  	                             
 University of Freiburg 	 Phone:  +49 761 203-5730      
 Hermann-Herder-Str. 3  	 FAX:    +49 761 203-5873            
 D-79104 Freiburg i.Br  	 E-Mail: ansgar.seiter_at_physik.uni-freiburg.de 
 Germany
Received on Fri Jun 06 1997 - 00:00:00 CEST

Original text of this message