Subject | possible to CREATE a TRIGGER from a INSIDE? |
---|---|
Author | skander_sp |
Post date | 2005-10-27T13:26:33Z |
I'm trying to create a new trigger from INSIDE the database, into a
procedure using the EXECUTE STATEMENT
I create a string with all the syntax (really only a command)
EXECUTE STATEMENT
'CREATE TRIGGER TRIAL_TRIGGER for TABLE1 '||
'AFTER INSERT '||
'POSITION 100 '||
'AS BEGIN '||
'EXECUTE PROCEDURE MY_PROCEDURE; '
'END';
but when I try I get an ERROR.. very confusing, I think in semicolon.
Any idea to do or really not possible to do?
procedure using the EXECUTE STATEMENT
I create a string with all the syntax (really only a command)
EXECUTE STATEMENT
'CREATE TRIGGER TRIAL_TRIGGER for TABLE1 '||
'AFTER INSERT '||
'POSITION 100 '||
'AS BEGIN '||
'EXECUTE PROCEDURE MY_PROCEDURE; '
'END';
but when I try I get an ERROR.. very confusing, I think in semicolon.
Any idea to do or really not possible to do?