PL/SQL (MOSC)

MOSC Banner

Dynamic manipulting :NEW in trigger

edited Oct 3, 2010 9:43PM in PL/SQL (MOSC) 6 commentsAnswered
 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?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center