Subject Re: DLL Scripting
Author ben_ata
--- In firebird-support@yahoogroups.com, "zifnabbe" <zifnabbe@u...> wrote:
>
> I would like to update some of my users databases through a script.
> Some databases contain certain views which need to be updated. For
> this I first DROP the view and then CREATE it again.
>
> However, this gives a problem for the databases in which the VIEW
> doesn't exist yet. Is there a way to detect if a VIEW (or TABLE, ...)
> exists in a database and according to that result exutete the DROP
> DLL-statement?
>
> Thanks

From the 1.5 release notes:

(1.5) RECREATE VIEW
Exactly the same as CREATE VIEW if the view does not already exist. If
it does exist, RECREATE VIEW
will try to drop it and create a completely new object. RECREATE VIEW
will fail if the object is in use.
Uses the same syntax as CREATE VIEW.

I guess that's what you are looking for

Thomas