Execute Multiple Procedures From 1 Trigger
Posted in 2000
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity, Versions, Editions & End-of-Life
Hi, IDS 7.30 I'm trying to create a trigger which executes two stored procedures but I'm getting a syntax error. Is it possible to do this or should I merge the procedures. -- --------------------------------------- Tony Flaherty aef@mfs.misys.co.uk Analyst Programmer Misys Financial Systems All statements and opinions are my own, Misys don't pay me enough to have opinions on their behalf .
Tony Flaherty wrote:
> IDS 7.30
>
> I'm trying to create a trigger which executes two stored procedures but I'm
> getting a syntax error.
>
> Is it possible to do this or should I merge the procedures.
CREATE TRIGGER double_proc INSERT ON SomeTable
REFERENCING NEW AS new
FOR EACH ROW (EXECUTE PROCEDURE proc1(new.column1, USER, CURRENT),
EXECUTE PROCEDURE proc2(new.column9, TODAY, new.column2));
The key point is the comma to separate the statements within the list of
statements.
I'm cribbing from the 5.00 manual, but I'm pretty sure the syntax hasn't
changed significantly.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
Yep, it was the comma, I was using a semi-colon <Aaarrghhh> :-)
Thanks for the reply.
--
---------------------------------------
Tony Flaherty aef@mfs.misys.co.uk
Analyst Programmer
Misys Financial Systems
All statements and opinions are my own,
Misys don't pay me enough to have opinions
on their behalf
.
Jonathan Leffler wrote in message <38A4F461.77C4D4FA@earthlink.net>...
>
>
>Tony Flaherty wrote:
>
>> IDS 7.30
>>
>> I'm trying to create a trigger which executes two stored procedures but
I'm
>> getting a syntax error.
>>
>> Is it possible to do this or should I merge the procedures.
>
>CREATE TRIGGER double_proc INSERT ON SomeTable
> REFERENCING NEW AS new
> FOR EACH ROW (EXECUTE PROCEDURE proc1(new.column1, USER, CURRENT),
> EXECUTE PROCEDURE proc2(new.column9, TODAY, new.column2));>
>The key point is the comma to separate the statements within the list of
>statements.
>
>I'm cribbing from the 5.00 manual, but I'm pretty sure the syntax hasn't
>changed significantly.
>
>
>--
>Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
>Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
>#include <disclaimer.h>
>
>