Re: Using stored function in SELECT statement
Date: 1996/05/24
Message-ID: <31A62B6F.355C_at_empros.com>#1/1
Victor Z. Krokhmal wrote:
>
> Hi there,
>
> I am having difficulty in using stored function in SELECT statement.
> And next example returns error :
> ORA-06571 "Function does not guarantee to not update database".
>
> SELECT var1 FROM tab1
> WHERE Func1(var2)=0;
>
> Therefore, could anyone out there help me to solve this problem.
>
> Thanks for any advice.
>
> ---
> €ŠVictor Z. Krokhmal Šemail: victor_at_dwayne.freenet.kiev.ua Š€
> ÂÅ Oracle Database Administrator Å phone: +7 (044) 212-54-81 /faxmodem/ Å Â
> ‚ŠState Tax Inspectorate - Ukraine ŠŠ‚
Hi Victor,
Really this is a very simple question. Each function you want to use in
the SQL-statements (not only in select) should not change anything in
the database. Usually you can just set
PRAGMA ......
in the head of the function (look for details into "Oracle 7.1 server
addendum"). But the real problem emerge when you are trying to use
some standard packages in your function. In this case all stored procedures
and functions called from your function should have this PRAGMA
phrase, but sometimes it's impossible. This is a restriction.
Alexander Filonov,
Mosakin corp. (former Oracle Moscow hotline),
email afilonov_at_empros.com
afilonov_at_mosakin.com
All above opinions are my own and not necessarily of my employer. Received on Fri May 24 1996 - 00:00:00 CEST