Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Function Name Declaration
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 BortelReceived on Thu May 20 2004 - 09:14:36 CDT
![]() |
![]() |