Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Function FunctionName may not be used in SQL
You can only use functions in SQL as part of a select or where
clause, not procedures.
The way you want to code it makes it a procedure call (which
internally calls a function). That won't work.
You're stuck with a standalone function, or global in a package.
Keith Jamieson wrote:
> SEE comment
> ================
> >> I have a package, which contains a SQl statement which has a function
call
> >> on a column value;
> >> I only want these functions to be local to the Package only.
> >> If I declare the function inside the package only, I get a message
PLS-00231
> >> saying that the function is proscribed(Not Allowed).
> >>
> >> I can get everything to work if I declare the functions in the package
> >> header, and add PRAGMA RESTRICT_REFERENCE syntax for each function.
However,
> >> this makes these functions Public.
> >>
> >> for various reasons, I cannot call the function in the form x :=
> >> functionName.
> >>
> >> Vesions
> >> ================
> >> ORACLE 8.06.0.0
> >> Pl/SQL 8.0.6.0.0.
> >>
> >>
> >
> >Since the functions are part of a package that package name must be
> >included in the function call:
> >
> >x:=packageName.functionName;
> >
> >
> Comment
> =============
> (But not if its declared in the same package, as it is in my case).
> Additionally, I have to call it through sql as it is part of a decode
> statement.
> >--
> End Comment
> =============
> >David Fitzjarrell
> >Oracle Certified DBA
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.
Received on Fri Oct 27 2000 - 16:15:31 CDT
![]() |
![]() |