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 know if a procedure exists?

Re: How to know if a procedure exists?

From: Bram Stieperaere <bse_at_N_O_S_P_A_Msodexho-pass.be>
Date: Tue, 07 Jul 1998 10:37:25 +0200
Message-ID: <35A1DE45.D07D7281@N_O_S_P_A_Msodexho-pass.be>


declare

lv_ProcExists integer;

begin

    select        count(*)
        into       lv_ProcExists
        from     sys.all_objects
        where   (owner = '<schemaname>') and
                    (object_type = 'PROCEDURE') and
                    (object_name = '<name of procedure>') and
                    (status = 'VALID')

    ;
    dbms_output.put_line(lv_ProcExists); end;

Jacques Sireude wrote:

> Hi,
> What is the sql statement to know if a procedure does exists in the
> database?
>
> Thanks for any help.
>
> Jacques.
>
> ----------------------------------------------------------------------------
> ----------------
> Jacques SIREUDE
> 6585 PICASSO Rd Apt#3
> ISLA VISTA CA 93117
> USA
> tel/fax: 1-805-685-9208
> e-mail: sireude_at_eiffel.com
> jacques.sireude_at_enst-bretagne.fr
> http://www-eleves.enst-bretagne.fr/~sireude
> ----------------------------------------------------------------------------
> ----------------
Received on Tue Jul 07 1998 - 03:37:25 CDT

Original text of this message

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