Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to check if a Function exists in a package
On Jan 26, 1:19 am, "hitman" <dsag..._at_post.t-com.hr> wrote:
> > if existfunction(p_customer.a) then
> > Is that possible to have a function existfunction() to do it like
> > described above?Shouldn't be a problem. Check table USER_SOURCE, columns: "name" and
> "type" and return true if your function exists.
That will not work for packaged functions. The OP would either have to write the packaged function as a standalone function, write a standalone function to call the packaged function or alter the above query:
select 1
from user_source
where name = :packagename
and type = 'PACKAGE'
and lower(ltrim(text)) like 'function ' || lower(:functionname) || '%';
Received on Fri Jan 26 2007 - 10:53:47 CST