Subject Re: [firebird-support] Re: How to drop stored procedure from another stored procedure ?
Author Milan Babuskov
scabaj wrote:
> CREATE PROCEDURE DROP_PROC
> AS
> begin

Oh, I missed the fact that you want to do it from a stored procedure.
EXECUTE BLOCK should be executed as a single statement. If you really
want to do it from SP, try this instead:

CREATE PROCEDURE DROP_PROC
AS
BEGIN
if (exists(select 1
from RDB$PROCEDURES where RDB$PROCEDURE_NAME = 'PROC'))
then
EXECUTE STATEMENT 'drop procedure PROC';
END


--
Milan Babuskov
http://fbexport.sourceforge.net