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: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 20 May 2004 16:14:36 +0200
Message-ID: <c8ie92$3ej$1@news4.tilbu1.nb.home.nl>


kong wrote:

> Hi IB,
>
> Thanks for ur effort.
> But actually i want to use this function within my sql statement.
>
> Which is like the "test" function you created, i want to use it in my
> sql. E.g.:select * from tableA where test(name)='abc'
>
> Back to the point:
> 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".
>

SQL does not "see" it. Only what is declared in the package specification, is "public". All that's just in the package body is hidden - encapsulated if you will, and only "visible" to that package body.

Hence the possibility to have a package declaration will all your project constants, etc, but without a package body. Used quite commonly, where I come from.

-- 

Regards,
Frank van Bortel
Received on Thu May 20 2004 - 09:14:36 CDT

Original text of this message

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