Dynamic manipulting :NEW in trigger
i have to manipulate the :NEW.xxxx variable in a trigger. But i only found a solution for reading it with this code:
EXECUTE IMMEDIATE 'BEGIN :NEW.' || column_name || ' := ''' || default_value || '''; END;'
USING OUT v_value;
this works fine for reading the value of :NEW.xxxxx into the variable v_value. it's not possible to overwrite :NEW.xxxxx with this code. it only OUT's the current value and ignores the := ''' || default_value || '''
Does anyone know how to set dynamcly :NEW.xxxx variables?
EXECUTE IMMEDIATE 'BEGIN :NEW.' || column_name || ' := ''' || default_value || '''; END;'
USING OUT v_value;
this works fine for reading the value of :NEW.xxxxx into the variable v_value. it's not possible to overwrite :NEW.xxxxx with this code. it only OUT's the current value and ignores the := ''' || default_value || '''
Does anyone know how to set dynamcly :NEW.xxxx variables?
0