Re: Internal Function Call within a SELECT statement

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Sun, 2 Aug 1998 09:40:03 +0200
Message-ID: <6q153s$843$1_at_newton.a2000.nl>


Kevin,

>I am attempting to call an internal function from within a select
statement.
>I can perform this task if the function is stored within the database but I
>cannot seem to perfom the same task with the internal function.

Some stored functions may be used in select statements, others may not. Whenever Oracle cannot tell at run time if your function does not make changes to the database itself, Oracle refuses the use of it. In case of your internal function, Oracle needs a hand telling it that the function may be used. Add a pragma to tell Oracle not to worry about your function (in fact: tell Oracle to restrict the operations your function can perform):

    function get_govt_id( v_person_id in varchar2 ) return varchar2     is
      <snip>
    end get_govt_id;
    pragma restrict_references( get_govt_id, wnds, rnds, wnps, rnps );

See you docs for the options.

Arjan. Received on Sun Aug 02 1998 - 09:40:03 CEST

Original text of this message