Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Function Name Declaration

Re: PL/SQL Function Name Declaration

From: Gary Menchen <gary.e.menchen_at_dartmouth.edu>
Date: Wed, 19 May 2004 07:41:09 -0400
Message-ID: <c8fh85$ema$1@merrimack.Dartmouth.EDU>


kong wrote:
> Hi,
>
> I have created a function and coded it within a Package. At first, I
> declared this function name at package body. It prompted error when i
> tried to use this function in a sql (within that package). The error
> is "This function may not be used in sql".
>
> However, it is working fine when i declare the function at package
> specification. May I know why such occurrence happened? Any solutions
> for this as I do not want to declare it at package specification.
>
> Thanks in advance.

If a function is declared only in a package body then it can be used only within that function body - in fact in the function body it can only be referenced in code that appears after the function unless there was a forward declaration. Received on Wed May 19 2004 - 06:41:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US