Re: Creating Triggers
Posted in 1997
Stefan P. Romankiw wrote:
>
> I am trying to create a trigger that updates the value "upperdesc" for new
> rows inserted into a table "x_forms". < no relation to x_files <g> >. For
> INSERT triggers, Informix does not like the INTO clause located in the
> EXECUTE statement. Below is my trigger definition:
>
> --- Trigger
> create trigger iupperdesc insert on x_forms> referencing new as newdesc for each row
> (execute procedure upper(newdesc.formdesc) into upperdesc);
> ---
>
> Does anyone know of a way around this problem?
Assuming "upperdesc" is a column in the same table you're inserting
into, you can't do it. By definition, insert triggers cannot modify
the inserted row of the triggering table.
Call Informix and tell them to add your name to the list of people
who would like this capabilty. Mention feature request # 2566.
-----------
Roger Tomas
AG Communication Systems