Article View: borland.public.interbase.sql
Article #11165Re: SQL check for existence of trigger
From: Martijn Tonies
Date: Thu, 05 Dec 2002 13:11
Date: Thu, 05 Dec 2002 13:11
39 lines
1715 bytes
1715 bytes
IF is only supported in procedures and triggers. -- With regards, Martijn Tonies InterBase Workbench - the developer tool for InterBase Upscene Productions http://www.upscene.com "This is an object-oriented system. If we change anything, the users object." > Attempting to check if a trigger exists before dropping: > > if (exists(SELECT 1 FROM rdb$triggers > WHERE rdb$trigger_name='T_BU_POMASTER')) then > begin > DROP TRIGGER T_BU_POMaster > end > > When I run the above SQL, I get the following error. > > Dynamic SQL Error > SQL error code = -104 > Token unknown - line 1, char 0 > if > > Suggestions??? > > Thanks, > Tom Greenway > > >
Technical Details
Message-ID:
<3def4fe6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3def4b47@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,b8780affc33ba092 X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-05 05:18:31 PST From: "Martijn Tonies" <m.tonies@upscene_remove.com> Newsgroups: borland.public.interbase.sql References: <3def4b47@newsgroups.borland.com> Subject: Re: SQL check for existence of trigger Date: Thu, 5 Dec 2002 14:11:31 +0100 Lines: 41 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: <3def4fe6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039093734 212.238.179.102 (5 Dec 2002 05:08:54 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail