Update table's column in table's trigger
Posted in 1999
Topics: Triggers, Constraints & Referential Integrity
How do I write a trigger to update a column in the table that is being
updated, based on a value from another column in the table?
For example, in table composer, with columns lastname and _ulastname, this
doesn't work
CREATE TRIGGER tri_composer INSERT on composer
REFERENCING NEW as post
FOR EACH ROW( post._ulastname = upper( post.lastname ) );
Any help is greatly appreciated.
Thanks
Mike Skillicorn
Mike wrote:
>
> How do I write a trigger to update a column in the table that is being
> updated, based on a value from another column in the table?
>
> For example, in table composer, with columns lastname and _ulastname, this
> doesn't work
>
> CREATE TRIGGER tri_composer INSERT on composer
> REFERENCING NEW as post
> FOR EACH ROW( post._ulastname = upper( post.lastname ) );
You can only do something like this if you have 7.31+ it was prohibited in
earlier versions. See the 7.31 or IDS.2000 Manual for an example.
Art S. Kagel