Subject | Re: How to drop stored procedure from another stored procedure ? |
---|---|
Author | scabaj |
Post date | 2007-09-07T18:56:40Z |
Looks well but I get parsing error compiling it
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 4, column 9.
BLOCK.
CREATE PROCEDURE DROP_PROC
AS
begin
EXECUTE BLOCK AS
BEGIN
if (exists(select 1
from RDB$PROCEDURES where RDB$PROCEDURE_NAME = 'PROC'))
then
EXECUTE STATEMENT 'drop procedure PROC';
END
end
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 4, column 9.
BLOCK.
CREATE PROCEDURE DROP_PROC
AS
begin
EXECUTE BLOCK AS
BEGIN
if (exists(select 1
from RDB$PROCEDURES where RDB$PROCEDURE_NAME = 'PROC'))
then
EXECUTE STATEMENT 'drop procedure PROC';
END
end
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
>drop it.
> S?awek Cabaj wrote:
> > Let's say I don't know is there in the database such
> > procedure as PROC. I'd like to check it and if it is there to
>
> EXECUTE BLOCK 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
>