ELSIF UPDATING THEN
IF NVL(:OLD.IS_ACTIVE,'X') = NVL(:NEW.IS_ACTIVE,'X') -- varchar2(1)
AND NVL(:OLD.NOTES,'XXXXX') = NVL(:NEW.NOTES,'XXXXX') -- varchar2(50)
AND NVL(:OLD.EID,'XXXXX') = NVL(:NEW.EID ,'XXXXX') THEN -- varchar2(20)
RETURN;
In a trigger I have written the above logic to check for the old and new values , If the three columns are equal then I want the trigger to return without doing anything .
From the above logic, there can be some cases where the Old value can be null and the new value can be 'XXXXX' the condition will be TRUE and trigger will return without doing anything , which is FALSE .
Please suggest how to handle this kind of logic , So that the conditions are always/mostly correct.