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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Conditional Procedure Creation

Re: Conditional Procedure Creation

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 23 Sep 2000 12:53:40 +0200
Message-ID: <969715078.8598.0.pluto.d4ee154e@news.demon.nl>

Yeah,
you'll need to use dbms_sql (7.3 and 8.0) or execute immediate for this, as pl/sql doesn't support DDL directly.

Regards,

Sybrand Bakker, Oracle DBA

"Vaughan Jackson" <vaughan_jackson_at_my-deja.com> wrote in message news:8qgnrq$365$1_at_nnrp1.deja.com...
> Hi,
>
> I would like to be able to create a stored procedure, in one of two
> different ways, according to certain database settings, something like
> this
>
> if <database supports feature>
> then
> create procedure my_procedure() as
> begin
> <implementation using feature>
> end my_procedure;
> else
> create procedure my_procedure() as
> begin
> <implementation not using feature>
> end my_procedure;
> end if;
>
> However, whenever I try this in sqlplus, I get syntax error
> messages telling me that "create" was not expected after the
> "then". I cannot use #ifdefs, because the condition concerned is one
> to be found in the DB itself.
>
> Thanks,
>
> Vaughan Jackson.
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Sep 23 2000 - 05:53:40 CDT

Original text of this message

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