Allow Repeated Change With SQL Triggers
November 20, 2013 Paul Tuohy
In my previous article, I described how an RPG program as a before trigger, could be used to synchronize two columns in a table. There is an alternative. Instead of using an RPG trigger, we could have used an SQL trigger. An SQL trigger allows us to be more specific about when the trigger is activated and also has the advantage of portability to other database management systems. The scenario was where a date, stored as a packed numeric column, was to be converted to a proper date field. This was accomplished by duplicating the packed numeric column (and |