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 -> Conditional Procedure Creation

Conditional Procedure Creation

From: Vaughan Jackson <vaughan_jackson_at_my-deja.com>
Date: Fri, 22 Sep 2000 22:52:51 GMT
Message-ID: <8qgnrq$365$1@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 Fri Sep 22 2000 - 17:52:51 CDT

Original text of this message

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