INSERT TRIGGER
Posted in 2008
Stephan Kirmse — — source: Usenet: comp.databases.informix
Hello,
once again today I´m searching for help :-/
I need to create an INSERT-TRIGGER.
CREATE TRIGGER t1INSERT ON test
REFERENCING OLD AS pre NEW AS post
FOR EACH ROW WHEN (test.nr = 1)
(INSERT INTO test2 VALUES (1));
I want to add a row (with value=1) to the table test2 everytime a new row with nr=1 in table test is added.
The error message tells me "Incorrect use of old or new values correlation name inside trigger."
In the manual I read:
[...] You cannot specify an old correlation name for an insert trigger. You cannot specify a new correlation name for a delete trigger. [...]
But how can I make a condition an the "OLD" table ??
Thanks for your patience
Regards, Stephan