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: Vaughan Jackson <vaughan_jackson_at_my-deja.com>
Date: Sat, 23 Sep 2000 15:22:35 GMT
Message-ID: <8qihrb$cm$1@nnrp1.deja.com>

Thanks again Sybrand,

I will try this approach.

Best Regards,
Vaughan Jackson.

In article <969715078.8598.0.pluto.d4ee154e_at_news.demon.nl>,   "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> 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.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Sep 23 2000 - 10:22:35 CDT

Original text of this message

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