Thread View: borland.public.interbase.sql
2 messages
2 total messages
Started by Tom Greenway
Thu, 05 Dec 2002 12:51
SQL check for existence of trigger
Author: 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
Re: SQL check for existence of trigger
Author: 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 > > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads