Does anyone know how I make a user-defined function "deterministic" ? I've written a complex text processing function against which I would like to create a function based index. However, I just get the error "ORA-30533: The function is not deterministic" when I try to create the index. The manual helpfully tells me that the solution is to make the function deterministic, but doesn't explain how.
DETERMINISTIC (in terms of FBI's) means that for a given set of inputs the function will always return the same result.
For example, TO_CHAR(date_field) always returns the same result, whereas TO_CHAR(sysdate - date_field) returns a different result depending on what day it is.
Note: You can add the DETERMINISTIC keyword to any function. See docs for details...
You need to indicate that the function will always return the same value for any given set of input arguments.
Here is an example for you:
create or replace function ala_bala
select 3.14 into x from dual;
Click Here to Expand Forum to Full Width