Subject | Re: [firebird-support] How to drop stored procedure from another stored procedure ? |
---|---|
Author | Martijn Tonies |
Post date | 2007-09-06T14:25:31Z |
Hi,
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
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> > Let's say I don't know is there in the database such procedure asPROC.
> I'd like to check it and if it is there to drop it. I tried somethinglike
> this but I got "Parsing error"Right sorry, you're calling this from another stored procedure -- procedres
> >
> > begin
> > select count(*) from RDB$PROCEDURES where RDB$PROCEDURE_NAME = 'PROC'
> > into :OK;
> > if (:OK = 1) then
> > begin
> > DROP PROCEDURE PROC;
> > 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.
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
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com