Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Conditional Procedure Creation
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