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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to check if a Function exists in a package

Re: How to check if a Function exists in a package

From: Vince <vinnyop_at_yahoo.com>
Date: 26 Jan 2007 08:53:47 -0800
Message-ID: <1169830426.949080.13610@a75g2000cwd.googlegroups.com>

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

Original text of this message

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