Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Setting Values in an after update trigger
Mon, Jul 6 2009 8:06 AMPermanent Link

Peter Thorne
I can't see what is wrong with this:

BEGIN
 IF (NEWROW.element_id = 1) THEN
   CALL CreateScenarioLiquid(NEWROW.scenario_id, NEWROW.plan_id, NEWROW.element_id);
   CALL CreateScenarioSolid(NEWROW.scenario_id, NEWROW.plan_id, NEWROW.element_id);
   CALL CreateScenarioLosses(NEWROW.scenario_id, NEWROW.plan_id, NEWROW.element_id);
 END IF;
 IF (NEWROW.element_id = 6) OR (NEWROW.element_id = 7) OR (NEWROW.element_id = 8) THEN
   SET NEWROW.has_child = 1;
   CALL CreateScenarioLiquid(NEWROW.scenario_id, NEWROW.plan_id, NEWROW.element_id);
   CALL CreateScenarioSolid(NEWROW.scenario_id, NEWROW.plan_id, NEWROW.element_id);
 END IF;
END

I am not able to add the statement "SET NEWROW.has_child = 1;". As far as I can see from the documentation, this is valid?

Thanks

Peter
Mon, Jul 6 2009 8:29 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Peter,

NEWROW exists in AFTER UPDATE Triggers, but it's Read Only.

--
Fernando Dias
[Team Elevate]

Image