Semi-deterministic?
Date: Wed, 5 Feb 2014 21:32:49 +0000
Message-ID: <D7864FA3E7830B428CB2A5A5301B63EE7D29A928_at_S7041VA005.soa.soaad.com>
Hi...
I have a database view that needs has a select-list item something like this:
SELECT
...
, ADD_MONTHS(po_date, xxcust_profiles_pkg.get_profile_value('LEADTIME_MONTHS')) eta_date,
...
FROM big_table;
Now, here is the thing: I want to execute get_profile_value once per call, but not once per row.
I don't think I can make the function DETERMINISTIC, because it's not (the profile value is stored in the database and may be changed).
Also, I am shy about giving xxcust_profiles_pkg the SERIALLY_REUSABLE pragma, because I cannot guarantee that it won't be called from places where it will yield an ORA-6534 (Cannot access serially reusable package...).
I really want it to behave like SYSDATE - where all rows in the query use the same value but not all queries in the same session do.
Does anyone have any ideas / thoughts?
Thanks,
Matt
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Feb 05 2014 - 22:32:49 CET