Subject Re: [firebird-support] How to drop stored procedure from another stored procedure ?
Author Martijn Tonies

> > Let's say I don't know is there in the database such procedure as
> I'd like to check it and if it is there to drop it. I tried something
> this but I got "Parsing error"
> >
> > begin
> > select count(*) from RDB$PROCEDURES where RDB$PROCEDURE_NAME = 'PROC'
> > into :OK;
> > if (:OK = 1) then
> > begin
> > end
> > end
> Is this an anonymous block of code? If so, Firebird doesn't support it.
> Firebird 2 supports EXECUTE BLOCK that might help to do this,
> check the Release Notes.

Right sorry, you're calling this from another stored procedure -- procedres
don't support DDL. You have to use EXECUTE STATEMENT.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
My thoughts:
Database development questions? Check the forum!