Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to call Stored Functions in a Select Statement.
On Sat, 05 Sep 1998 18:46:09 +0100, Aamer Akbar Janjua <aamer_at_janjua.demon.co.uk> wrote:
> I have a stored function which updates one table. I have to call it
>in a select statement.
> It gives me a error. Saying that the functions does not ensure
>updating database.
I don't believe that you can use a function in an SQL statement if it updates a table in the database. That's why you are getting the error. Further, even if your function does no updating, you must use a PRAGMA command to tell that to Oracle. This is done when the package creating the function is created. For example:
create package my_pack as
function X returns number; pragma restrict_references (X,wnds);
regards,
Jonathan Gennick Received on Tue Sep 08 1998 - 00:00:00 CDT