I am trying to append a text string with the value when an update is made on oracle table using trigger.
if old.v1 <> new.v1 then insert into table(v1, v2, v3) values(:new.v1 || 'This is new', :new.v2 , :new.v3)
i am not able to record when multiple conditions are used. I have tried elsif and case statement but couldn't get through. Another condition suppose means there is old.v2 <> new.v2 so
insert into table(v1, v2, v3) values(:new.v1 || 'This is new', :new.v2 || 'This is new' , :new.v3)
This is cool if both the conditions are true while insert by using "or"operator. I want it to work if any one of them is true then to append the text string along with the required value automatically and in case of both conditions both updated values should append string and when condition is not true just record the value.
Any suggestions please.
Aucun commentaire:
Enregistrer un commentaire