Article View: borland.public.interbase.sql
Article #11163Re: Whenever Sqlerror...
From: Martijn Tonies
Date: Thu, 05 Dec 2002 08:04
Date: Thu, 05 Dec 2002 08:04
42 lines
2106 bytes
2106 bytes
> Is there a way to see if a trigger or table exists in the database before > submitting an SQL update script? > > Example: > Client 1 has a database with NO BankDesc table > Client 2 has a database WITH a BankDesc table. > > Need to incorporate a SQL update that is similar to: > If NOT exist BankDesc then Create BankDesc... > > If possible, then the same update could be ran on both Client 1 and Client > 2's database with no errors. > > I looked at the 'Whenever SQLERROR Continue' example, but attempting a SQL > update: > Create table BankDesc.... > Whenever SqlError Continue > > via IBConsole was not successful (table already in database). If you have another look at the SQLERROR sample you'll see that most probably it's Embedded SQL only and the WHEN statement is Procedure language only. -- With regards, Martijn Tonies InterBase Workbench - the developer tool for InterBase http://www.upscene.com Firebird Workbench - the developer tool for Firebird http://www.upscene.com Upscene Productions http://www.upscene.com "This is an object-oriented system. If we change anything, the users object."
Technical Details
Message-ID:
<3def07ff@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3deeabb6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,5f20a07b5cfe1634 X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-05 00:08:58 PST From: "Martijn Tonies" <m.tonies@upscene_remove.com> Newsgroups: borland.public.interbase.sql References: <3deeabb6@newsgroups.borland.com> Subject: Re: Whenever Sqlerror... Date: Thu, 5 Dec 2002 09:04:48 +0100 Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 212.238.179.102 Message-ID: <3def07ff@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039075327 212.238.179.102 (5 Dec 2002 00:02:07 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail