Sql trigger for updating one table from another
The actual data is save in XML format that can be restored if need be.
I have a Maximo database that has a table structure I cannot change.
L LIMIT 1; END; and here is the problem, I can’t do that because: ERROR 1442 (HY000): Can't update table 'trig1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
Which is I think safety mechanism to prevent from infinite recursive trigger execution, but because of that I have no idea how to solve my problem.
When the subquery fails to find a matching row in tbl B, the subquery returns NULL.This is what I have been able to get so far in SQL based on my limited understanding of triggers, in case it helps (I realise it's not very good, treat it as pseudocode): good enough start.