i am writing a (packaged) function that collects some information from a table
- only READING the table BUT with dynamic SQL (the first parameter is
the tablename)
the problem occurs when i am trying to use this function in an INSERT
statement VALUES list. execution is terminated with "Function does not
guarantee not to modify database state or something like this.
i have tried to use the pragma RESTRICT REFERENCES but is does not work
bacause DBMS_SQL.* does not guarantee not to modify database state -
but i KNOW that is this case it guarantees.
so, is there any tricky way to tell oracle that this function is ok and
can be used in an insert ???
TIA