Article View: borland.public.interbase.sql
Article #11164SQL check for existence of trigger
From: Tom Greenway
Date: Thu, 05 Dec 2002 12:51
Date: Thu, 05 Dec 2002 12:51
19 lines
1300 bytes
1300 bytes
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:
<3def4b47@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!nntp2.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,b8780affc33ba092,start X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-05 05:17:59 PST From: "Tom Greenway" <tomgreenway@lllow.com> Newsgroups: borland.public.interbase.sql Subject: SQL check for existence of trigger Date: Thu, 5 Dec 2002 07:51:18 -0500 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 209.131.67.42 Message-ID: <3def4b47@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039092551 209.131.67.42 (5 Dec 2002 04:49:11 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!nntp2.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail