I am trying to eliminate null values without making the column "not null" to avoid errors. So, I wanted to create a trigger to update each inserted row if it contains null to replace it with 'N'. The following syntax results in
"Executed as Single statement. Failed [5423 : HY000] This trigger contains an invalid REFERENCING clause. Elapsed time = 00:00:00.018 STATEMENT 1: REPLACE failed. "
The Syntax:
Replace TRIGGER DB.C_UP_CLIENTS
AFTER INSERT ON DB.CLIENTS
REFERENCING OLD table as old_clients_table
NEW table as new_clients_table
FOR EACH Statement
(update DB.CLIENTS set NEEDS_AUTHENTICATION = 'N' where NEEDS_AUTHENTICATION is null;);