Subject | Re: [firebird-support] Re: How to drop stored procedure from another stored procedure ? |
---|---|
Author | Milan Babuskov |
Post date | 2007-09-09T13:21:26Z |
scabaj wrote:
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
> CREATE PROCEDURE DROP_PROCOh, I missed the fact that you want to do it from a stored procedure.
> AS
> begin
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